Re: TCPSend / Netscape Server 4.1
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 50581
interpreted = N
texte = Seems that some servers also require the Content-Type:application/x-www-form-urlencoded request header, for an ASCII post. The'Connection' header should also be included when using HTTP 1.1. This codeworked for me:[text]CRLF=[UnURL]%0D%0A[/UnURL][/text][TCPConnect host=secure2.epdq.co.uk&port=80][TCPSend]POST /cgi-bin/CcxBarclaysEpdqEncTool.e HTTP/1.1[CRLF][!][/!]Host: secure2.epdq.co.uk[CRLF][!][/!]Content-length: 83[CRLF][!][/!]Connection: close[CRLF][!][/!]Content-Type: application/x-www-form-urlencoded[CRLF][!][/!][CRLF][!][/!]clientid=5844&password=stetfortunadomus&chargetype=Auth¤cycode=826&total=9.99[/TCPSend][/TCPConnect]> -----Original Message-----> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of> John Peacock> Sent: Monday, May 19, 2003 11:19 AM> To: WebDNA Talk> Subject: Re: TCPSend / Netscape Server 4.1>>> Philip Edell wrote:> > Hi everyone,> >> > I trawled the archives for a clue as to why this doesnąt work:> >>> Most of the code below is unnecessary, but I assume you tried> to duplicate> exactly what NetDemon sent. If you are fooling around with> TCPConnect, you> should probably get a book that describes the HTTP protocol.>> >> > [TCPConnect host=secure2.epdq.co.uk&port=80]> > [TCPSend][UnURL]%0D%0A%0D%0A[/UnURL]POST> /cgi-bin/CcxBarclaysEpdqEncTool.e> ^^^^^^^^^^^^^^^^^^^^^^^^^^^ wrong>> > HTTP/1.1[UnURL]%0D%0A[/UnURL][!]> > [/!]Connection: close[UnURL]%0D%0A[/UnURL][!]> > [/!]User-Agent: Mozilla/4.03 [en] (Win95; I> ;Nav)[UnURL]%0D%0A[/UnURL][!]> > [/!]Host: secure2.epdq.co.uk[UnURL]%0D%0A[/UnURL][!]> > [/!]Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,> > */*[UnURL]%0D%0A[/UnURL][!]> > [/!]Accept-Language: en[UnURL]%0D%0A[/UnURL][!]> > [/!]Accept-Charset: iso-8859-1,*,utf-8[UnURL]%0D%0A[/UnURL][!]> > [/!]Content-length: 83[UnURL]%0D%0A%0D%0A[/UnURL][!]>> This CRLF/CRLF tells the server that the header has ended.> In particular, you> don't want the CRLF/CRLF you have at the top, since that will> signal that there> are _no_ headers, and everything else sent is body.>> In general, you probably don't need to have most of these> header fields. You> _should_ be able to get away with just this (notice the text> variable):>> [text]CRLF=[UnURL]%0D%0A[/UnURL][/text]>> [TCPConnect host=secure2.epdq.co.uk&port=80]> [TCPSend]POST /cgi-bin/CcxBarclaysEpdqEncTool.e HTTP/1.1[CRLF][!]> [/!]Host: secure2.epdq.co.uk[CRLF][!]> [/!]Content-length: 83[CRLF][!]> [/!][CRLF][!]> [/!]clientid=5844&password=stetfortunadomus&chargetype=Auth&cu> rrencycode=826&total=9.99[CRLF][!]> [/!][CRLF][!]> [/!][/TCPSend]> [/TCPConnect]>> but I see that doesn't work. You need to look at your logs> to see what the> server thinks is going wrong...>> HTH>> John>> --> John Peacock> Director of Information Research and Technology> Rowman & Littlefield Publishing Group> 4501 Forbes Boulevard> Suite H> Lanham, MD 20706> 301-459-3366 x.5010> fax 301-429-5748>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> > Web Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Seems that some servers also require the Content-Type:application/x-www-form-urlencoded request header, for an ASCII post. The'Connection' header should also be included when using HTTP 1.1. This codeworked for me:[text]CRLF=[unurl]%0D%0A[/UnURL][/text][TCPConnect host=secure2.epdq.co.uk&port=80][tcpsend]POST /cgi-bin/CcxBarclaysEpdqEncTool.e HTTP/1.1[CRLF][!][/!]Host: secure2.epdq.co.uk[CRLF][!][/!]Content-length: 83[CRLF][!][/!]Connection: close[CRLF][!][/!]Content-Type: application/x-www-form-urlencoded[CRLF][!][/!][CRLF][!][/!]clientid=5844&password=stetfortunadomus&chargetype=Auth¤cycode=826&total=9.99[/TCPSend][/TCPConnect]> -----Original Message-----> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of> John Peacock> Sent: Monday, May 19, 2003 11:19 AM> To: WebDNA Talk> Subject: Re: TCPSend / Netscape Server 4.1>>> Philip Edell wrote:> > Hi everyone,> >> > I trawled the archives for a clue as to why this doesnąt work:> >>> Most of the code below is unnecessary, but I assume you tried> to duplicate> exactly what NetDemon sent. If you are fooling around with> TCPConnect, you> should probably get a book that describes the HTTP protocol.>> >> > [TCPConnect host=secure2.epdq.co.uk&port=80]> > [tcpsend][unurl]%0D%0A%0D%0A[/UnURL]POST> /cgi-bin/CcxBarclaysEpdqEncTool.e> ^^^^^^^^^^^^^^^^^^^^^^^^^^^ wrong>> > HTTP/1.1[unurl]%0D%0A[/UnURL][!]> > [/!]Connection: close[unurl]%0D%0A[/UnURL][!]> > [/!]User-Agent: Mozilla/4.03 [en] (Win95; I> ;Nav)[unurl]%0D%0A[/UnURL][!]> > [/!]Host: secure2.epdq.co.uk[unurl]%0D%0A[/UnURL][!]> > [/!]Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,> > */*[unurl]%0D%0A[/UnURL][!]> > [/!]Accept-Language: en[unurl]%0D%0A[/UnURL][!]> > [/!]Accept-Charset: iso-8859-1,*,utf-8[unurl]%0D%0A[/UnURL][!]> > [/!]Content-length: 83[unurl]%0D%0A%0D%0A[/UnURL][!]>> This CRLF/CRLF tells the server that the header has ended.> In particular, you> don't want the CRLF/CRLF you have at the top, since that will> signal that there> are _no_ headers, and everything else sent is body.>> In general, you probably don't need to have most of these> header fields. You> _should_ be able to get away with just this (notice the text> variable):>> [text]CRLF=[unurl]%0D%0A[/UnURL][/text]>> [TCPConnect host=secure2.epdq.co.uk&port=80]> [tcpsend]POST /cgi-bin/CcxBarclaysEpdqEncTool.e HTTP/1.1[CRLF][!]> [/!]Host: secure2.epdq.co.uk[CRLF][!]> [/!]Content-length: 83[CRLF][!]> [/!][CRLF][!]> [/!]clientid=5844&password=stetfortunadomus&chargetype=Auth&cu> rrencycode=826&total=9.99[CRLF][!]> [/!][CRLF][!]> [/!][/TCPSend]> [/TCPConnect]>> but I see that doesn't work. You need to look at your logs> to see what the> server thinks is going wrong...>> HTH>> John>> --> John Peacock> Director of Information Research and Technology> Rowman & Littlefield Publishing Group> 4501 Forbes Boulevard> Suite H> Lanham, MD 20706> 301-459-3366 x.5010> fax 301-429-5748>>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to> > Web Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Scott Anderson
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Protecting Files (how to display vs. present a link to (2005)
.eml files (2001)
[WebDNA] WebDNA Hosting (2008)
can WC render sites out? (1997)
Email (1998)
Date Bug (1998)
[WebDNA] Needing Open Source Support (2012)
links to .db's ? (1999)
WidgetSoftware Downloads (2003)
default value from Lookup (was Grant, please help me) (1997)
First postarg not taking in $Commands (1997)
Orders w/in [sendmail] (1998)
[OT] See QT? (Was Eaaaasy FTP...) (2003)
Request Time Out (1997)
Sample Tea Room Search Error (1997)
How can I record purchases to a database? (1998)
Re[3]: 2nd WebCatalog2 Feature Request (1996)
How To question on setting up downloads (1997)
WebCat2 - Getting to the browser's username/password data (1997)
View order not right (1997)