Homepage › Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › http protocol: insert CRLF in Headers??
- This topic has 13 replies, 5 voices, and was last updated 13 years, 6 months ago by
Lawrence Williams.
-
CreatorTopic
-
May 14, 2009 at 3:29 pm #50867
Jim Kosloskey
ParticipantAll, 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
-
CreatorTopic
-
AuthorReplies
-
-
May 14, 2009 at 4:12 pm #67829
David Barr
ParticipantI 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.
-
May 14, 2009 at 4:31 pm #67830
Jim Kosloskey
ParticipantDave,
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
-
May 14, 2009 at 4:33 pm #67831
David Barr
ParticipantWhat are you trying to do? You can’t put a newline in the middle of a header; the http protocol doesn’t allow it.
-
May 14, 2009 at 4:54 pm #67832
Jim Kosloskey
ParticipantDave,
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
-
May 14, 2009 at 5:13 pm #67833
David Barr
ParticipantI 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.
-
May 14, 2009 at 5:17 pm #67834
Jim Kosloskey
ParticipantDave,
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
-
May 14, 2009 at 5:55 pm #67835
Charlie Bursell
ParticipantJim:
In your query proc are you using tclCurl? If not, you should. It gives you much better control
-
May 15, 2009 at 3:40 pm #67836
Michael Hertel
ParticipantJim,
I don’t know what I’m talking about here but…
I’ve seen %20 used representing a space character.
How about %13%10 ?
-
May 18, 2009 at 1:26 pm #67837
Jim Kosloskey
ParticipantCloverleaf(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
-
May 18, 2009 at 1:32 pm #67838
Charlie Bursell
ParticipantI’ll send you an example script.
-
September 17, 2009 at 8:02 pm #67839
Lawrence Williams
ParticipantWe 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) ?
-
September 17, 2009 at 8:13 pm #67840
Charlie Bursell
ParticipantcURL 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
-
September 21, 2009 at 6:59 pm #67841
Lawrence Williams
ParticipantI 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
-
-
AuthorReplies
- The forum ‘Cloverleaf’ is closed to new topics and replies.