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:

Finding max value for a field (1997) RE: Redirect (1998) [WebDNA] Setting secure cookie (2009) Stats (2004) too many nested tags ... (1997) WCf2 and nested tags (1997) page redirect in webDNA (1997) [SMSI] WebDNA is too good to go away! (2006) Pre-flight public flag (1997) Realtime Top 10 (1999) Newbie needs advice to learn to use WebDNA (2003) [WebDNA] [OT] BBEdit Glossary (2012) WebCommerce: Folder organization ? (1997) Webcatalog error, Plug-in for Webstar (1996) Date sorting (1997) Cart sweeper (2000) Anyone with a solution for this? (2001) authenticating a second user (1997) Auto-closing of databases (was DON'T use old cart file!) (1997) Questions about maximum (1999)