Problems when using httpget tcl procedure

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Problems when using httpget tcl procedure

  • Creator
    Topic
  • #48508
    chrisblake
    Participant

      Hello,

      I’m hoping someone will be able to help with this. I’ve been having problems when using the httpget procedure. Essentially its failing when i attempt an https connection. I can connect to a local test webserver using Xampp with the following code…

      set res [httpget {{URL https://localhost} {METHOD GET}

      {HEADERS {{Content-Type text/txt}}}

      {HTTPS { {MODE Client}  {CERT_FILE /hci/root/test_chris/chrisb/ssl/host.pem}

      {PRIVATE_KEY /hci/root/test_chris/chrisb/ssl/keys/ca.key} {PASSWORD YXJzZW5hbA==}}}}]

      However, if i change to another address(this time have to go through a proxy)…

      set res [httpget {{URL https://www.yieldbook.com} {METHOD GET}

      {HEADERS {{Content-Type text/txt}}}

      {PROXY {{HOST 10.66.32.179} {PORT 8080} {CREDENTIALS {}} {USER {}} {PASS {}}}}

      {HTTPS { {MODE Client} {CERT_FILE /hci/root/test_chris/chrisb/ssl/host.pem}

      {PRIVATE_KEY /hci/root/test_chris/chrisb/ssl/keys/ca.key} {PASSWORD YXJzZW5hbA==}}}}]

      It fails straight away with the following error…

      [0:TEST] ===Failed writing to SSL Socket handle 0x0005

      Data not received.   Socket Will Be Closed…

      [0:TEST] HTTP Client Error.  Failed sending HTTP ‘Get’ request.  Sent -1 bytes of 140.

      Message was:

      GET https://www.yieldbook.com HTTP/1.1

      From: anonymous@unknown.com

      User-Agent: HCDC __cHTTPClient

      Host: 10.66.32.179

      Connection: close

      I don’t think this even gets a chance to be sent to the proxy so don’t think this is whats causing the problem. So essentially its just a change of address and then it fails.

      Does anybody know what the error means? I assuming people have managed to get https working with httpget.

      Any help would be great.

      Thanks

      Chris

    • The forum ‘Cloverleaf’ is closed to new topics and replies.