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:
[WriteFile] problems (1997)
reading a cookie problem (1998)
WC Database Format (1997)
quantity minimum problem (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
WebCat2 - many [carts] on one template page? (1997)
shipcost (1997)
WebCatalog Work (2001)
The Guru Speaks (1998)
Problems setting MIME Headers (1998)
Separate SSL Server (1997)
real beginner stumped (2000)
Grep email addresses in bbedit or webdna ... (2003)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
Resume Catalog ? (1997)
Date range (2006)
multi-paragraph fields (1997)
WebCatalog2 Feature Feedback (1996)
Quiestion (1997)
[shownext] (1998)