Re: [WebDNA] TCPConnect example doesn't work

This WebDNA talk-list message is from

2017


It keeps the original formatting.
numero = 113462
interpreted = N
texte = 1057 Ahh=85 well, If memory serves.. I think that=92s the way it=92s always = functioned=85 and I believe there has been some feature requests to allow tcpconnect to follow redirects. I think in PHP curl you have to specify to follow redirects. So, a workaround could be to use curl I guess. Donovan On Mar 9, 2017, at 11:36 AM, Kenneth Grome = wrote: > It doesn't follow the redirect like a POST tcpconnect does,=20 > that's why I said it's not working properly. >=20 > Do tcpconnects only follow redirects when using POST but not=20 > when using GET? IF so, this should be documented. >=20 > Or is there actually something wrong with the example I=20 > posted that's preventing it from following the redirect? >=20 > You can easily compare the two examples below. I would=20 > expect them to return the same results since they are=20 > requesting the same page, but they do not: >=20 >=20 > [tcpconnect host=3Dwww.webdna.us&port=3D80] > [tcpsend]GET / HTTP/1.0[unurl]%0D%0A%0D%0A[/unurl][/tcpsend] > [/tcpconnect] >=20 >=20 > [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] >=20 >=20 > I had the same problem when using both types of tcpconnects to=20 > request pages from two of my sites, each of which is on a=20 > different server. The POST versions worked fine every time,=20 > but the GET versions always failed. >=20 > And in my tests I specifically requested an existing file, but=20 > instead of receiving it in the GET versions I always got a 404=20 > error while the POST versions received the specified file. >=20 > Bottom line: I still think something's wrong, either with the=20 > internal code that interprets GET tcpconnects or with the=20 > WebDNA syntax itself. >=20 > Regards, > Kenneth Grome > WebDNA Solutions > http://www.webdnasolutions.com > Web Database Systems and Linux Server Administration >=20 >=20 >=20 > On 03/09/2017 10:39 AM, Donovan Brooke wrote: >> Looks like it=92s working to me.. a 302 is a (temp) redirect. >>=20 >> Donovan >>=20 >>=20 >>=20 >> On Mar 9, 2017, at 9:59 AM, Kenneth Grome = wrote: >>=20 >>> This sample code (from the webdna.us website) doesn't work: >>>=20 >>> [tcpconnect host=3Dwww.webdna.us&port=3D80] >>> [tcpsend]GET / HTTP/1.0[unurl]%0D%0A%0D%0A[/unurl][/tcpsend] >>> [/tcpconnect] >>>=20 >>> What's missing from this code ... or what's incorrect about? Or >>> don't tcpconnects work with method=3DGET any more? >>>=20 >>> Something's wrong with it because this is what it produces: >>>=20 >>> 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 >>>=20 >>> Regards, >>> Kenneth Grome >>> WebDNA Solutions >>> http://www.webdnasolutions.com >>> Web Database Systems and Linux Server Administration >>>=20 >>>=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 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 --------------------------------------------------------- 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 . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] TCPConnect example doesn't work (christophe.billiottet@webdna.us 2017)
  2. Re: [WebDNA] TCPConnect example doesn't work (Kenneth Grome 2017)
  3. Re: [WebDNA] TCPConnect example doesn't work (Michael Davis 2017)
  4. Re: [WebDNA] TCPConnect example doesn't work (Kenneth Grome 2017)
  5. Re: [WebDNA] TCPConnect example doesn't work (Michael Davis 2017)
  6. Re: [WebDNA] TCPConnect example doesn't work (Kenneth Grome 2017)
  7. Re: [WebDNA] TCPConnect example doesn't work (Donovan Brooke 2017)
  8. Re: [WebDNA] TCPConnect example doesn't work (Kenneth Grome 2017)
  9. Re: [WebDNA] TCPConnect example doesn't work (Donovan Brooke 2017)
  10. [WebDNA] TCPConnect example doesn't work (Kenneth Grome 2017)
1057 Ahh=85 well, If memory serves.. I think that=92s the way it=92s always = functioned=85 and I believe there has been some feature requests to allow tcpconnect to follow redirects. I think in PHP curl you have to specify to follow redirects. So, a workaround could be to use curl I guess. Donovan On Mar 9, 2017, at 11:36 AM, Kenneth Grome = wrote: > It doesn't follow the redirect like a POST tcpconnect does,=20 > that's why I said it's not working properly. >=20 > Do tcpconnects only follow redirects when using POST but not=20 > when using GET? IF so, this should be documented. >=20 > Or is there actually something wrong with the example I=20 > posted that's preventing it from following the redirect? >=20 > You can easily compare the two examples below. I would=20 > expect them to return the same results since they are=20 > requesting the same page, but they do not: >=20 >=20 > [tcpconnect host=3Dwww.webdna.us&port=3D80] > [tcpsend]GET / HTTP/1.0[unurl]%0D%0A%0D%0A[/unurl][/tcpsend] > [/tcpconnect] >=20 >=20 > [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] >=20 >=20 > I had the same problem when using both types of tcpconnects to=20 > request pages from two of my sites, each of which is on a=20 > different server. The POST versions worked fine every time,=20 > but the GET versions always failed. >=20 > And in my tests I specifically requested an existing file, but=20 > instead of receiving it in the GET versions I always got a 404=20 > error while the POST versions received the specified file. >=20 > Bottom line: I still think something's wrong, either with the=20 > internal code that interprets GET tcpconnects or with the=20 > WebDNA syntax itself. >=20 > Regards, > Kenneth Grome > WebDNA Solutions > http://www.webdnasolutions.com > Web Database Systems and Linux Server Administration >=20 >=20 >=20 > On 03/09/2017 10:39 AM, Donovan Brooke wrote: >> Looks like it=92s working to me.. a 302 is a (temp) redirect. >>=20 >> Donovan >>=20 >>=20 >>=20 >> On Mar 9, 2017, at 9:59 AM, Kenneth Grome = wrote: >>=20 >>> This sample code (from the webdna.us website) doesn't work: >>>=20 >>> [tcpconnect host=3Dwww.webdna.us&port=3D80] >>> [tcpsend]GET / HTTP/1.0[unurl]%0D%0A%0D%0A[/unurl][/tcpsend] >>> [/tcpconnect] >>>=20 >>> What's missing from this code ... or what's incorrect about? Or >>> don't tcpconnects work with method=3DGET any more? >>>=20 >>> Something's wrong with it because this is what it produces: >>>=20 >>> 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 >>>=20 >>> Regards, >>> Kenneth Grome >>> WebDNA Solutions >>> http://www.webdnasolutions.com >>> Web Database Systems and Linux Server Administration >>>=20 >>>=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 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 --------------------------------------------------------- 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 . Donovan Brooke

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:

NT error logs (1997) input and accents (2000) contextual shownext (1998) What's wrong with this replace? (2002) Almost a there but..bye bye NetCloak (1997) Finding max value for a field (1997) BadSuffix with 2.1b3 cgi (1997) Formatting date to number (2000) SiteEdit NewFile.html ? (1997) setting line item numbers (1998) CommandSecurity? (1997) too many nested ... problem (1997) If Empty ? (1997) AddLineItem Problem (1997) Superfilous Characters (1998) is there a [purchase]? (1998) OT: SEO (2007) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) WebCatalog Hosting (1996) WebDNA-Talk Digests (1997)