› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › http protocol: insert CRLF in Headers??
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 30+ years Cloverleaf, 60 years IT – old fart.
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.
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 30+ years Cloverleaf, 60 years IT – old fart.
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.
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 30+ years Cloverleaf, 60 years IT – old fart.
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.
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 30+ years Cloverleaf, 60 years IT – old fart.
Jim:
In your query proc are you using tclCurl? If not, you should. It gives you much better control
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 ?
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 30+ years Cloverleaf, 60 years IT – old fart.
I’ll send you an example script.
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) ?
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
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