Re: FW: Username and password in tcp connect/send
This WebDNA talk-list message is from 2001
It keeps the original formatting.
numero = 39973
interpreted = N
texte = Marc M. wrote:> > I have a tcp connect/send which seems to work fine except for the page being> accessed is realm based username and password protected. How would I> incorporate my username and password into the tcp send?> > [text]post_data=myform name value pairs here[/text]> > [tcpconnect host=myhost.com]> [tcpsend]POST /.portweb?adminshow HTTP/1.0[UnURL]%0D%0A[/UnURL][!]> [/!]USER-AGENT: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT> 5.0)[UnURL]%0D%0A[/UnURL][!]> [/!]Content-type: application/x-www-form-urlencoded[UnURL]%0D%0A[/UnURL][!]> [/!]Content-length:[!]> [/!][CountChars][post_data][/CountChars][UnURL]%0D%0A[/UnURL][!][/!]Authorization: Basic [encryptmethod=Base64][username]:[password][/encrypt][UnURL]%0D%0A[/UnURL][!]> [/!][post_data][UnURL]%0D%0A[/UnURL][!][/!][UnURL]%0D%0A[/UnURL][!]> [/!][/TCPSend]> [/tcpconnect]> > ------ End of Forwarded MessageNote that I made two changes. I added the Authorization: Basic line and Imoved the double CR/LF to the end, after the [post_data]. The rules for HTTPrequests are very specific: the request is terminated by two CR/LF pairs. Theform post data must be followed by the two blank lines, not preceeded.Get yourself a copy of something like net.demon (Windows only) that allows you to see the actual HTTP request and response: http://www.netdemon.net/ HTHJohn-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------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://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Marc M. wrote:> > I have a tcp connect/send which seems to work fine except for the page being> accessed is realm based username and password protected. How would I> incorporate my username and password into the tcp send?> > [text]post_data=myform name value pairs here[/text]> > [tcpconnect host=myhost.com]> [tcpsend]POST /.portweb?adminshow HTTP/1.0[unurl]%0D%0A[/UnURL][!]> [/!]USER-AGENT: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT> 5.0)[unurl]%0D%0A[/UnURL][!]> [/!]Content-type: application/x-www-form-urlencoded[unurl]%0D%0A[/UnURL][!]> [/!]Content-length:[!]> [/!][countchars][post_data][/CountChars][unurl]%0D%0A[/UnURL][!][/!]Authorization: Basic [encryptmethod=Base64][username]:[password][/encrypt][unurl]%0D%0A[/UnURL][!]> [/!][post_data][unurl]%0D%0A[/UnURL][!][/!][unurl]%0D%0A[/UnURL][!]> [/!][/TCPSend]> [/tcpconnect]> > ------ End of Forwarded MessageNote that I made two changes. I added the Authorization: Basic line and Imoved the double CR/LF to the end, after the [post_data]. The rules for HTTPrequests are very specific: the request is terminated by two CR/LF pairs. Theform post data must be followed by the two blank lines, not preceeded.Get yourself a copy of something like net.demon (Windows only) that allows you to see the actual HTTP request and response: http://www.netdemon.net/ HTHJohn-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------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://search.smithmicro.com/
John Peacock
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:
Navigator Parsing (1997)
Running _every_ page through WebCat-error.html (1997)
Support ?? (1997)
Variable Sizes, Widths and Colors (2000)
[WriteFile] problems (1997)
[WebDNA] Authorize working connection... (2020)
t or f (1997)
[/application] error? (1997)
[WebDNA] =?windows-1252?Q?Re=3A_=5BWebDNA=5D_WebDNA=3A_Could_not_establis?= (2012)
Three new problems, maybe a fourth (1997)
Field Totals (2004)
Signal Raised (1997)
emailer (1997)
[WebDNA] WebDNA7 site randomly dropping tags (2011)
Forms Search Questions (1997)
re: [addlineitem] working almost (1997)
[sendmail] questions... (1997)
A question for the experts (2000)
Prevent multiple appends with Reload Button (1997)
Text data with spaces in them... (1997)