Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

http_get() Fails to Return <BODY>

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    http_get() Fails to Return <BODY>

    I have been using this code and it has been working. But recently it has been failing to capture the body html, or anything else.

    Code:
    dim res as p = http_get("https://safer.fmcsa.dot.gov/")
    Untitled.png

    The web site is publically available and there are no passwords.


    It has been returning this error_text:

    Could not connect to server: Secure Sockets Layer OpenSSL Error - SYSCALL
    An existing connection was forcibly closed by the remote host.

    Error occurred in INET::SSLSocket::Connect

    But in testing I have found that other sites also do not return the body, although they return the header

    For example:

    Code:
    dim res as p = http_get("https://www.alphasoftware.com/")

    So I am not sure if the error has anything to do with it.

    Build 5009-5081

    #2
    Re: http_get() Fails to Return &lt;BODY&gt;

    Build 5009 includes a change to http_get, http_post, and http_fetch to only use more secure ciphers by default. As confirmed using the SSL Labs test, that server does NOT support secure ciphers: https://www.ssllabs.com/ssltest/anal....fmcsa.dot.gov

    You can specify the specific ciphers to use, as in the example below. This will allow you to receive a response from the server.

    Note/Warning: The example below uses RC4, which is considered to be insecure. The example is intended simply to show that it is possible to get a response from the server. This is NOT a recommendation to use this code in a production environment. You should carefully test to find the most secure cipher possible, and also carefully consider the acceptability of using less secure ciphers in your specific case. Any responsibility for running at a decreased level of security is your own.

    Code:
    res = http_get("https://safer.fmcsa.dot.gov/","",443,3000,.f.,.f.,"RC4")

    Lenny Forziati
    Vice President, Internet Products and Technical Services
    Alpha Software Corporation

    Comment


      #3
      Re: http_get() Fails to Return &lt;BODY&gt;

      Thanks for the response. But it still does not seem to be working correctly. No error is returned, but res.body does not contain the body html.

      It contains everything above the <BODY> tag.

      res.body:

      <!DOCTYPEc HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      <HTML><HEAD><TITLE>SAFER WEB</TITLE>
      <META http-equiv=Content-Type content="text/html; charset=windows-1252">
      <LINK title="Style Sheet" href="safer.css" rel=stylesheet>
      <LINK title="Table of Contents" href="toc.htm">
      </HEAD>

      Comment


        #4
        Re: http_get() Fails to Return &lt;BODY&gt;

        Hmm. When I put this in the interactive window, I got:

        res = http_get("https://safer.fmcsa.dot.gov/","",443,3000,.f.,.f.,"RC4")
        ?res
        = body = <!DOCTYPEc HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
        <HTML><HEAD><TITLE>SAFER WEB</TITLE>
        <META http-equiv=Content-Type content="text/html; charset=windows-1252">
        <LINK title="Style Sheet" href="safer.css" rel=stylesheet>
        <LINK title="Table of Contents" href="toc.htm">
        </HEAD>

        <BODY>

        <!-- tell the header include file (header.inc) not to include the home/previous buttons
        in the upper right hand corner of the the home page-->



        <!-- Response.Write("header.inc role: " & Session("role") & "<BR>") -->
        <!-- Response.Write("path: " & Request.Cookies("COMPASS_PORTAL_PATH").value & "<BR>")-->
        <!-- Response.Write("path: " & Request.ServerVariables("ALL_HTTP") & "<BR>") -->

        <TABLE cellSpacing=0 cellPadding=1 width="100%" border=0 bordercolor=red summary="Table used for formatting purposes only">

        <TR>
        <TH SCOPE="ROW"><div class="hidden">SAFER Table Layout</div></TH>
        <TD vAlign=centered ><IMG alt="FMCSA Logo" SRC="images/SAFER-System.GIF" width="100%" border=0>
        </TD>
        </TR>

        <TR>
        <TH SCOPE="ROW"><div class="hidden">SAFER Table Layout</div></TH>
        <TD COLSPAN=3><IMG alt="horizontal line" SRC="images/SAFER_hr_half.jpg" width="100%" height="2">
        </TD>
        </TR>


        </TABLE>


        <center><br>
        <strong>**WARNING**WARNING**WARNING</strong><br/>
        </center>
        <br>
        You are accessing a U.S. Government information system. This information system, including all related equipment, networks,
        and network devices, is provided for U.S. Government-authorized use only. Unauthorized or improper use of this system is
        prohibited, and may result in civil and criminal penalties, or administrative disciplinary action. The communications and
        data stored or transiting this system may be, for any lawful Government purpose, monitored, recorded, and subject to audit
        or investigation. By using this system, you understand and consent to such terms.
        <center><br>
        <strong>**WARNING**WARNING**WARNING</strong><br/>
        </center>
        <br>

        <TABLE align=center cellSpacing=0 cellPadding=0 border=0 bordercolor="orange" style="font-family:arial;font-size=120%" summary="For formatting purpose">
        <TR><TH SCOPE="COL"><div class="hidden">SAFER Table Layout</div></TH>
        </TR>
        <TR>
        <TH SCOPE="ROW"><div class="hidden">SAFER Table Layout</div></TH>
        <TD align="center">
        <b><font color="navy">WELCOME TO SAFER</font></b><br>
        <!--<b>Safety And Fitness Electronic Records System</b>-->
        <!--<b><font color="black">S</font><font color="gray">afety</font>
        <font color="black">A</font><font color="gray">nd</font>
        <font color="black">F</font><font color="gray">itness</font>
        <font color="black">E</font><font color="gray">lectronic</font>
        <font color="black">R</font><font color="gray">ecords</font>
        <font color="gray">System</font></b>-->
        </TD>
        </TR>
        </TABLE>
        <br>
        <p align="left">
        The FMCSA Safety and Fitness Electronic Records (SAFER) System offers company safety data and related services to
        industry and the public over the Internet. Users can search FMCSA databases, register for a USDOT number,
        pay fines online, order company safety profiles, challenge FMCSA data using the DataQs system,
        access the Hazardous Material Route registry, obtain National Crash and Out of Service
        rates for Hazmat Permit Registration, get printable registration forms and find information about other FMCSA Information Systems.

        <TABLE cellSpacing=0 cellPadding=0 border=0 align="center"><TR><TD>&nbsp;</TD></TR><TR><TD align="center"><B>Notice</B></TD></TR></TABLE>
        <TABLE cellSpacing=0 cellPadding=0 border=0 align="center">
        <TR><TD align="center">
        <BR />The updating of a specific USDOT Number or Docket Number requires the use of a Personal Identification Number (PIN) to access the system.<BR /></TD></TR>
        <TR><TD align="center">
        <BR />If your PIN is not known, you may request one be provided by selecting one of the following options:<BR />
        </TD></TR>
        <TR><TD align="center">
        <BR /><A href="https://safer.fmcsa.dot.gov/AutoPin/index.xhtml">Click here to request a USDOT Number PIN be emailed.</A><BR />
        </TD></TR>
        <TR><TD align="center">
        <BR /><A href="https://li-public.fmcsa.dot.gov/LIVIEW/PKG_PIN_START.PRC_INTRO">Click here to request a USDOT Number PIN be mailed to the address on file.</A><BR />Allow 7 - 10 Business Days to receive a PIN notification letter.<BR />
        </TD></TR>
        <TR><TD align="center">
        <BR /><A href="https://li-public.fmcsa.dot.gov/LIVIEW/PKG_PIN_START.PRC_INTRO">Click here to request a Docket Number PIN be mailed to the address on file.</A><BR />Allow 7 - 10 Business Days to receive a PIN notification letter.<BR />Note: Docket Number PINs cannot be emailed.<BR />
        </TD></TR>
        </TABLE>



        <P align=center><FONT color=blue><B>

        </B></FONT></FONT></P>
        <br>
        <TABLE cellSpacing=0 cellPadding=0 border=0 align="center"><TR> <TD align="center"><p align="center"><font color="blue">Enforcement users must now use the FMCSA Portal link to SAFER to access SAFER Enforcement Related Functions.</font></FONT></TD></TR></TABLE>
        </font><br></FONT></TD></TR></TABLE>

        <br>

        <br>
        <!--<TABLE align=center cellSpacing=0 cellPadding=0 border=0 bordercolor="orange" style="font-family:arial;font-size=120%" summary="Table is used for formatting purpose">
        <TR>
        <TD align="center">
        <b><font color="red">NOTICE</font></b><br><br>
        <b>Safety And Fitness Electronic Records System</b>
        <b><font color="black">FMCSA</font><font color="black"></font>
        <font color="black">A</font><font color="black">nnounces</font>
        <font color="black">N</font><font color="black">ew</font>
        <font color="black">R</font><font color="black">egistration</font>
        <font color="black">W</font><font color="black">eb</font>
        <font color="black">S</font><font color="black">ite</font>
        </b>(<A Href="new registration write-up.htm">HTML</A> and <A HREF="new registration write-up.pdf">PDF</a>)
        </TD>
        </TR>
        </TABLE>-->


        <TABLE align-center width="100%" cellSpacing=0 cellPadding=0 border=0 bordercolor="green" summary="For formatting purpose">
        <TR><TH SCOPE="COL"><div class="hidden">SAFER Table Layout</div></TH>
        </TR>
        <TR>
        <TH SCOPE="COL"><div class="hidden">SAFER Table Layout</div></TH>
        <TD width="5%">&nbsp;
        </TD>
        <TABLE align=center cellSpacing=0 cellPadding=3 border=0 bordercolor=navy style="font-family:arial;font-size=100%" longdesc="FMCSA Public Business Services">
        <TBODY>
        <TR><TH SCOPE="COL"><div class="hidden">SAFER Table Layout</div></TH>
        </TR>
        <TR>
        <TH SCOPE="COL"><div class="hidden">SAFER Table Layout</div></TH>
        <TD width="33%" valign=top nowrap="nowrap" longdesc="USDOT Number Registration and Enforcement Login Features">
        <IMG alt="horizontal line" SRC="images/SAFER_hr_half.jpg" width="100%" height="2">
        <P align="center">
        <h4 align="center">FMCSA Services</h4>
        <UL>

        <!-- Disable Registration link if the FOCI link is down -->

        <LI><A href="http://www.fmcsa.dot.gov/registration-licensing/online-registration/onlineregdescription.htm">FMCSA Registration & Updates</A></LI></UL><UL>


        <!--<LI><A href="CSP_Order.asp">Company Safety Profile</A></UL><UL>-->

        <!--<LI><A href="CSP_Subscribe.asp">Company Safety Profile Subscription</A></UL><UL>-->

        <!--<LI><A href="http://diy.dot.gov">DIY</A></UL><UL>-->

        <!-- Disable Registration link if the FOCI link is down -->

        <LI><A href="http://mcmis.volpe.dot.gov/mcs150t/PKG_EMIS_PAYMENTS.PRC_PRE_DISPLAY">Online Fine Payment</A></UL><UL>



        <!--<LI><A href="https://ask.fmcsa.dot.gov/app/mcmiscatalog/mcmishome">MCMIS Data Dissemination Catalog</A></UL>-->
        <LI><A href="https://ask.fmcsa.dot.gov/app/mcmiscatalog/mcmishome">MCMIS Data Dissemination Catalog/Company Safety Profiles</A></UL>


        <h4 align="center">SAFER Information</h4>
        <UL>
        <LI><A href="about.aspx">About SAFER</A></LI>
        <LI><A href="news.aspx">SAFER News</A></LI>
        <!--<LI><A href="POCs.aspx">Points of Contact</A></LI>-->
        <LI><A href="DataUpdateRates.aspx">Company Snapshot Updates</A></LI>
        <LI><A href="faq.aspx">Frequently Asked Questions</A></LI>
        </UL><br>


        <!--P align="center"-->




        <!--P align="center"-->



        <!--b>Administrator</b-->
        <br>




        <b>Enforcement Users: Please use FMCSA Portal</b>&nbsp;
        <A href="https://portal.fmcsa.dot.gov">Login</A>



        <br>
        <!--P align="center"-->
        </TD>
        <TH SCOPE="COL"><div class="hidden">SAFER Table Layout</div></TH>
        <TD width="33%" valign=top longdesc="List of FMCSA Searches Available">
        <IMG alt="horizontal line" SRC="images/SAFER_hr_half.jpg" width="100%" height="2">
        <P align="center">
        <h4 align="center">FMCSA Searches</h4>
        <UL align="center">
        <P align="center">
        <LI><A href=CompanySnapshot.aspx>Company Snapshot</A></UL><UL>
        <LI><A href="http://ai.fmcsa.dot.gov">Analysis & Information (A&I) Online</A></UL><UL>
        <LI><A href="http://li-public.fmcsa.dot.gov/LIVIEW/pkg_carrquery.prc_carrlist">Licensing & Insurance</A></UL><UL>
        <LI><A href="http://li-public.fmcsa.dot.gov/LIVIEW/pkg_oos_process.prc_oos_search">Orders to Cease Operation (OCO)/<br>Out of Service Orders (OSO)</A></UL><UL>
        <LI><A href="http://mcmis.volpe.dot.gov/mcs150t/pkg_ct_public.prc_ct_public_search">Cargo Tank</A></UL><UL>
        <LI><A href="HazMatRates.aspx">Crash Rate & Inspection Out of Service (OOS) Rates for Hazardous Materials Safety Permit Program</A>
        <font color="navy" size=1><i>(Calculated on 05/01/2012)</i></font></UL><UL>
        <LI><A href="http://www.fmcsa.dot.gov/forms/print/r-l-forms.htm">FMCSA Registration Forms</A></UL><UL>
        <LI><a href="UCRQueryForm.aspx">Unified Carrier Registration (UCR)</a></UL><UL>
        <LI><A href="http://mcmis.volpe.dot.gov/mcs150t/p
        Jay Talbott
        Lexington, KY

        Comment


          #5
          Re: http_get() Fails to Return &lt;BODY&gt;

          Oops! My mistake. It works perfectly. Thanks!

          Comment


            #6
            Originally posted by Lenny Forziati View Post
            Re: http_get() Fails to Return &lt;BODY&gt;

            Build 5009 includes a change to http_get, http_post, and http_fetch to only use more secure ciphers by default. As confirmed using the SSL Labs test, that server does NOT support secure ciphers: https://www.ssllabs.com/ssltest/anal....fmcsa.dot.gov

            You can specify the specific ciphers to use, as in the example below. This will allow you to receive a response from the server.

            Note/Warning: The example below uses RC4, which is considered to be insecure. The example is intended simply to show that it is possible to get a response from the server. This is NOT a recommendation to use this code in a production environment. You should carefully test to find the most secure cipher possible, and also carefully consider the acceptability of using less secure ciphers in your specific case. Any responsibility for running at a decreased level of security is your own.

            Code:
            res = http_get("https://safer.fmcsa.dot.gov/","",443,3000,.f.,.f.,"RC4")
            Hi Lenny
            I am getting the same error message when trying to run http_fetch (calling a web service). When run in SoapUI ( that's a Postman alternative ) it works perfectly, but from AA it fails with the error message mentioned above.
            I don't know what to put in the Ciper list though ( also not explained at all in the docs ). When checking a successful connection from my browser and analyzing the security, i see the following in the "secure connection settings" :
            "The connection to this site is encrypted and authenticated using TLS 1.2, ECDHE_RSA with X25519, and CHACHA20_POLY1305"

            I'm using AA version 7776
            Thanks
            Jaime

            Comment


              #7
              Cipher suites and their naming are dictated by OpenSSL. You can use ALL for testing, but this will likely allow more than you want. There is a good cipher suite reference at https://www.microfocus.com/documenta...2507C9CD7.html

              Lenny Forziati
              Vice President, Internet Products and Technical Services
              Alpha Software Corporation

              Comment


                #8
                Originally posted by Lenny Forziati View Post
                Cipher suites and their naming are dictated by OpenSSL. You can use ALL for testing, but this will likely allow more than you want. There is a good cipher suite reference at https://www.microfocus.com/documenta...2507C9CD7.html
                Thanks for the reference.
                I tried with "ALL" and am still getting the same error message. Is it possible AA's internal openssl works tls 1.1 instead of 1.2? Is there some place where i can check?

                Thanks
                Jaime

                Comment


                  #9
                  when I link - to https://safer.fmcsa.dot.gov/

                  403 Forbidden

                  Insanity: doing the same thing over and over again and expecting different results.
                  Albert Einstein, (attributed)
                  US (German-born) physicist (1879 - 1955)

                  Comment


                    #10
                    Originally posted by peteconway View Post
                    when I link - to https://safer.fmcsa.dot.gov/

                    403 Forbidden
                    I wonder if IP addresses from outside the US are blocked.
                    Mike Brown - Contact Me
                    Programmatic Technologies, LLC
                    Programmatic-Technologies.com
                    Independent Developer & Consultant​​

                    Comment


                      #11
                      On the money - my Godaddy USA Server lets me see it.

                      Pete
                      Insanity: doing the same thing over and over again and expecting different results.
                      Albert Einstein, (attributed)
                      US (German-born) physicist (1879 - 1955)

                      Comment


                        #12
                        Originally posted by WindForce View Post

                        Thanks for the reference.
                        I tried with "ALL" and am still getting the same error message. Is it possible AA's internal openssl works tls 1.1 instead of 1.2? Is there some place where i can check?

                        Thanks
                        Jaime
                        TLS 1.2 is included and enabled in the OpenSSL library distributed with Alpha Anywhere. I would need the specific URL you are working with in order to troubleshoot this further. Please submit a bug report with the complete details to reproduce the issue.

                        Lenny Forziati
                        Vice President, Internet Products and Technical Services
                        Alpha Software Corporation

                        Comment


                          #13
                          Originally posted by Lenny Forziati View Post

                          Please submit a bug report with the complete details to reproduce the issue.
                          Bless you Lenny for forcing me to prepare a bug report :-)
                          While preparing it, i run the testcase from my other server ( AA build 7847) and it works great.
                          The server where my app runs is inside a very secure environment, so i guess something is blocking my app from authenticating correctly.
                          What puzzles me though is SoapUI runs the handshake successfully but gets empty responses.
                          From my "external" server this runs perfectly, with the default http_fetch call ( even without specifying the cipher )

                          Many thanks, will go bother the IT guys now...

                          Many thanks
                          Jaime

                          Comment

                          Working...
                          X