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:
Memory Error message (1998)
Where is f2? (1997)
Need help with emailer- 2 issues (1997)
Help formatting search results w/ table (1997)
Static pages and store builder (2000)
Date Search (2004)
WebCatalog 2.0 b 15 mac (1997)
Webcat no longer supported? (2006)
Help name our technology! I found it (1997)
[WebDNA] Wishlist: ignore whitespace in database changes (2016)
Error 11 (1996)
Help! Strange happenings... (1997)
Bad suffix error (1997)
relogin same user? (1998)
FYI: virus alert (1996)
OBDC Support (1997)
[addlineitems] (1997)
WebDNA Max Proc Usage and httpd processor build up (2008)
Multiple SSL Keys (1998)
docs for WebCatalog2 (1997)