http protocol: insert CRLF in Headers??

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf http protocol: insert CRLF in Headers??

  • Creator
    Topic
  • #50867
    Jim Kosloskey
    Participant

      All,

      Anyone had any success getting a CRLF (Carriage Return/Line Feed x0dx0a, nr) properly set in the Headers: window of the http protocol?

      I have tried every method I can think of to get that to occur and it seems that the normal Tcl representatins are not getting converted.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    Viewing 12 reply threads
    • Author
      Replies
      • #67829
        David Barr
        Participant

          I think it’s a list.  If you put each header as a separate list item, the CR/LF’s are added automatically.  I could be wrong.

        • #67830
          Jim Kosloskey
          Participant

            Dave,

            Thanks for the information.

            In this case, however, I need to imbed the CRLF inside the list entry not between the list entries..

            It does not appear that is getting resolved using the favorite Tcl methods for expressing CRLF – or at least so it seems.

            email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

          • #67831
            David Barr
            Participant

              What are you trying to do?  You can’t put a newline in the middle of a header; the http protocol doesn’t allow it.

            • #67832
              Jim Kosloskey
              Participant

                Dave,

                It appears the receiving system wants a mulitipart form and, under certain circumstances) that needs to have a CRLF between the keyword of the Content-Disposition entryand the data value associated with that keyword.

                Since the http protocol only has a Header entry and the message, I was trying to put the multipart/form-data characteristics that define the login, etc. that needs to proceed the message in the Headers entry of the protocol configuration.

                email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

              • #67833
                David Barr
                Participant

                  I assume that you are using “httpQuery” as your query TPS.  You could leave the extra header out of the protocol configuration and add another proc to the stack before the httpQuery that modifies the global “cfgs” variable to add or remove the header.

                  Another option is to modify httpQuery to add an argument to add this header.

                • #67834
                  Jim Kosloskey
                  Participant

                    Dave,

                    I was actually in the process of having my own ‘Query’ proc to condition things the way I think they should be.

                    Complicating matters is the payer for the receiving system is well versed in obfuscation and is less than able or perhaps willing to assist.

                    Thus I have no real idea what it is they are receiving so I can adapt – and they do not seem capable of finding that out.

                    Thanks

                    email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

                  • #67835
                    Charlie Bursell
                    Participant

                      Jim:

                      In your query proc are you using tclCurl?  If not, you should.  It gives you much better control

                    • #67836
                      Michael Hertel
                      Participant

                        Jim,

                        I don’t know what I’m talking about here but…

                        I’ve seen %20 used representing a space character.

                        How about %13%10 ?

                      • #67837
                        Jim Kosloskey
                        Participant

                          Cloverleaf(R) 5.6.

                          OK I am trying TclCurl.

                          I got a handle by doing the curl::init.

                          When I try to do the configure -httppost with my list of httppost options, I get ‘Error1’ which indicates a Memory Allocation error.

                          I have searched and cannot find very much useful documentaiton for TclCurl and nothing that clarifies what could be causing this issue.

                          If I cannot even get the configuration set, I don’t see this as a better option.

                          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

                        • #67838
                          Charlie Bursell
                          Participant

                            I’ll send you an example script.

                          • #67839
                            Lawrence Williams
                            Participant

                              We have an interface to a web server that posts to an Oracle database.  We recently upgraded from Cloverleaf 5.4 to 5.7 and this interface does not work with version 5.7

                              The only suggestion HealthVision support could offer was to “make it work with cURL”.  As Jim pointed out, I have been able to find very little about cURL and how to implement it…meanwhile we are having to run this one interface on version 5.4 until I figure out a solution.

                              As anyone else had similar issues with their http-client based interfaces after upgrading to 5.5+ (I believe this is when they started including cURL) ?

                            • #67840
                              Charlie Bursell
                              Participant

                                cURL is probably better documented than most any other API you will use.

                                TclCurl is well documented. with examples, at

                                http://personal1.iddeo.es/andresgarci/tclcurl/english/docs.html

                              • #67841
                                Lawrence Williams
                                Participant

                                  I have an interface that it is posting data to a PL/SQL object within an Oracle database on the receiving server.

                                  I have looked over the website pointed out by Charlie, unfortunately one of the key links on the website is invalid (http://curl.haxx.se/docs/httpscripting.shtml).

                                  There is no “index.html” or home page to hit on the receiving server, and I am wondering if this fact is causing an unsuccessful reply situation between the http-client protocol of Cloverleaf 5.7 and the receiving server….. (I point out Cloverleaf 5.7 because this same interface works with Cloverleaf 5.4 without TclCurl).

                                  I have unsuccessfully tried implementing the httpQueryCurl.tcl procedure on the forum, but I get a thread panic when trying to use it.

                                  To actually post a question with this – is there a way of posting data to a PL/SQL object using TclCurl ?  When I attempt to go to the URL from a “tcl>” prompt, using the command “curl::transfer -url http://xxxxxxx” I get a 404 Not Found error and the error “The requested URL /xxx/xxxxx” was not found on this server” – I don’t know if there is some requirement I am missing for TclCurl or if this is now unsupported with Cloverleaf 5.7

                              Viewing 12 reply threads
                              • The forum ‘Cloverleaf’ is closed to new topics and replies.