Re: [WebDNA] TCPConnect example doesn't work
This WebDNA talk-list message is from 2017
It keeps the original formatting.
numero = 113461
interpreted = N
texte = 1056It doesn't follow the redirect like a POST tcpconnect does,=20that's why I said it's not working properly.Do tcpconnects only follow redirects when using POST but not=20when using GET? IF so, this should be documented.Or is there actually something wrong with the example I=20posted that's preventing it from following the redirect?You can easily compare the two examples below. I would=20expect them to return the same results since they are=20requesting the same page, but they do not:[tcpconnect host=3Dwww.webdna.us&port=3D80][tcpsend]GET / HTTP/1.0[unurl]%0D%0A%0D%0A[/unurl][/tcpsend][/tcpconnect][text]host=3Dwww.webdna.us[/text][text]path=3D/[/text][text]n=3D[unurl]%0D%0A[/unurl][/text][text]content=3D[/text][tcpconnect host=3D[host]&port=3D80][tcpsend]POST [path] HTTP/1.0[n][!][/!]Host: [host][n][!][/!]User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)[n][!][/!]Content-Type: text/namevalue[n][!][/!]Content-Length: [countchars][content][/countchars][n][n][!][/!][content][n][!][/!][/tcpsend][/tcpconnect]I had the same problem when using both types of tcpconnects to=20request pages from two of my sites, each of which is on a=20different server. The POST versions worked fine every time,=20but the GET versions always failed.And in my tests I specifically requested an existing file, but=20instead of receiving it in the GET versions I always got a 404=20error while the POST versions received the specified file.Bottom line: I still think something's wrong, either with the=20internal code that interprets GET tcpconnects or with the=20WebDNA syntax itself.Regards,Kenneth GromeWebDNA Solutionshttp://www.webdnasolutions.comWeb Database Systems and Linux Server AdministrationOn 03/09/2017 10:39 AM, Donovan Brooke wrote:> Looks like it=E2=80=99s working to me.. a 302 is a (temp) redirect.>=20> Donovan>=20>=20>=20> On Mar 9, 2017, at 9:59 AM, Kenneth Grome
wro=te:>=20>> This sample code (from the webdna.us website) doesn't work:>>>> [tcpconnect host=3Dwww.webdna.us&port=3D80]>> [tcpsend]GET / HTTP/1.0[unurl]%0D%0A%0D%0A[/unurl][/tcpsend]>> [/tcpconnect]>>>> What's missing from this code ... or what's incorrect about? Or>> don't tcpconnects work with method=3DGET any more?>>>> Something's wrong with it because this is what it produces:>>>> HTTP/1.1 302 Moved Temporarily Date: Thu, 09 Mar 2017 15:59:16 GMT>> Server: Apache/2.2.15 (CentOS) Location: page.dna?numero=3D27>> Content-Length: 1 Vary: Accept-Encoding,User-Agent Connection:>> close Content-Type: text/html>>>> Regards,>> Kenneth Grome>> WebDNA Solutions>> http://www.webdnasolutions.com>> Web Database Systems and Linux Server Administration>>>>>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> Bug Reporting: support@webdna.us>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us>=20---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us.
Associated Messages, from the most recent to the oldest:
1056It doesn't follow the redirect like a POST tcpconnect does,=20that's why I said it's not working properly.Do tcpconnects only follow redirects when using POST but not=20when using GET? IF so, this should be documented.Or is there actually something wrong with the example I=20posted that's preventing it from following the redirect?You can easily compare the two examples below. I would=20expect them to return the same results since they are=20requesting the same page, but they do not:[tcpconnect host=3Dwww.webdna.us&port=3D80][tcpsend]GET / HTTP/1.0[unurl]%0D%0A%0D%0A[/unurl][/tcpsend][/tcpconnect][text]host=3Dwww.webdna.us[/text][text]path=3D/[/text][text]n=3D[unurl]%0D%0A[/unurl][/text][text]content=3D[/text][tcpconnect host=3D[host]&port=3D80][tcpsend]POST [path] HTTP/1.0[n][!][/!]Host: [host][n][!][/!]User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)[n][!][/!]Content-Type: text/namevalue[n][!][/!]Content-Length: [countchars][content][/countchars][n][n][!][/!][content][n][!][/!][/tcpsend][/tcpconnect]I had the same problem when using both types of tcpconnects to=20request pages from two of my sites, each of which is on a=20different server. The POST versions worked fine every time,=20but the GET versions always failed.And in my tests I specifically requested an existing file, but=20instead of receiving it in the GET versions I always got a 404=20error while the POST versions received the specified file.Bottom line: I still think something's wrong, either with the=20internal code that interprets GET tcpconnects or with the=20WebDNA syntax itself.Regards,Kenneth GromeWebDNA Solutionshttp://www.webdnasolutions.comWeb Database Systems and Linux Server AdministrationOn 03/09/2017 10:39 AM, Donovan Brooke wrote:> Looks like it=E2=80=99s working to me.. a 302 is a (temp) redirect.>=20> Donovan>=20>=20>=20> On Mar 9, 2017, at 9:59 AM, Kenneth Grome wro=te:>=20>> This sample code (from the webdna.us website) doesn't work:>>>> [tcpconnect host=3Dwww.webdna.us&port=3D80]>> [tcpsend]GET / HTTP/1.0[unurl]%0D%0A%0D%0A[/unurl][/tcpsend]>> [/tcpconnect]>>>> What's missing from this code ... or what's incorrect about? Or>> don't tcpconnects work with method=3DGET any more?>>>> Something's wrong with it because this is what it produces:>>>> HTTP/1.1 302 Moved Temporarily Date: Thu, 09 Mar 2017 15:59:16 GMT>> Server: Apache/2.2.15 (CentOS) Location: page.dna?numero=3D27>> Content-Length: 1 Vary: Accept-Encoding,User-Agent Connection:>> close Content-Type: text/html>>>> Regards,>> Kenneth Grome>> WebDNA Solutions>> http://www.webdnasolutions.com>> Web Database Systems and Linux Server Administration>>>>>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> Bug Reporting: support@webdna.us>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us>=20---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us.
Kenneth Grome
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:
Sendmail truncation in Eudora Clients (1998)
Configuring E-mail (1997)
London WebCatalog Jobs? (2000)
Date Formats (1997)
WebCat Emailer & Liststar (1997)
WebCat Versions (2003)
I'm a Fool! -- Was -> RE: Convert Chars Issue? (2000)
Shipcost Based on SubTotal (1998)
WebCatalog and Macromedia Flash (1998)
[OT] Ecommerce Insurance (2000)
SendMail on OS X (2003)
sending graphics in HTML email via [sendmail]? (2000)
Server Freeze (1998)
Re:UPS, FEDEX TRACKING (1999)
[WebDNA] Quick Grep question (2009)
PCS Frames (1997)
Passing Username and Password on the command line (2000)
SET and C-SET (1998)
WebCat2 beta 11 - new prefs ... (1997)
Date search bug (1997)