Re: TcpConnect get files on ver. 5.x BUG BUG BUG

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 55630
interpreted = N
texte = Well...let me backup a step... The TCPSend code was updated to receive larger chunks of data, over the open socket, per 'read', and appended to a new temp buffer. After receiving all the data, the temp stream is copied to the return buffer. The old method read the socket one character at a time and appended it directly to the return buffer (which in the case of a wrapping [writefile], appended the character directly to the output file). So I can see how this worked before. Question for Morten: Given your sample code: [!]---------- GET A FILE FROM A GIVEN DOMAIN AND PATH -----------[/!] [text]host=www.domain.com[/text] [text]path=/path_to_file_location/on_the_webserver[/text] [text]filename=filename.jpg[/text] [TCPConnect host=[host]] [writefile file=incoming/[filename]][TCPSend]GET [path]/[filename][unurl]%0D%0A[/unurl][/TCPSend][/writefile] [/TCPConnect] The resulting file (as Alain also pointed out), would contain the HTTP resonse headers. Would this not corrupt the image file? -----Original Message----- From: Scott Anderson [mailto:Sanderson@smithmicro.com] Sent: Thursday, January 22, 2004 9:45 AM To: WebDNA-Talk@talk.smithmicro.com Subject: Re: TcpConnect get files on ver. 5.x BUG BUG BUG Actually, taking a second look at these posts, I do not think you can use TCPConnect/TPSend to retrieve binary data. The internal buffers only handle ASCII data and will truncate after the first NULL character. Which is probably why you only get the gif header. It has always been like this. I do not see how this could have worked for any WebDNA version. -----Original Message----- From: Gary Krockover [mailto:gary@garykrockover.com] Sent: Thursday, January 22, 2004 9:01 AM To: WebDNA-Talk@talk.smithmicro.com Subject: Re: TcpConnect get files on ver. 5.x BUG BUG BUG I don't have 4.x installed here anywhere to test, but can confirm the same issue in 5.1e developer on Win2k. It does start to pull down a test image file, I see the gif89a header, but the file is incomplete. GK At 09:34 AM 1/22/2004, you wrote: >Ok - I have now tried every possible way of executing the code - And I can >only come the the conclusion that it must at bug in WebDNA version 5 - so >we can't convert to version 5.X before this is fixed. > >Is there a system for reporting bugs? o > >Regards >Morten ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: TcpConnect get files on ver. 5.x BUG BUG BUG ( "Scott Anderson" 2004)
  2. Re: TcpConnect get files on ver. 5.x BUG BUG BUG ( "Scott Anderson" 2004)
  3. Re: TcpConnect get files on ver. 5.x BUG BUG BUG ( "Scott Anderson" 2004)
  4. Re: TcpConnect get files on ver. 5.x BUG BUG BUG ( Gary Krockover 2004)
  5. Re: TcpConnect get files on ver. 5.x BUG BUG BUG ( "Morten Madsen" 2004)
Well...let me backup a step... The TCPSend code was updated to receive larger chunks of data, over the open socket, per 'read', and appended to a new temp buffer. After receiving all the data, the temp stream is copied to the return buffer. The old method read the socket one character at a time and appended it directly to the return buffer (which in the case of a wrapping [writefile], appended the character directly to the output file). So I can see how this worked before. Question for Morten: Given your sample code: [!]---------- GET A FILE FROM A GIVEN DOMAIN AND PATH -----------[/!] [text]host=www.domain.com[/text] [text]path=/path_to_file_location/on_the_webserver[/text] [text]filename=filename.jpg[/text] [TCPConnect host=[host]] [writefile file=incoming/[filename]][tcpsend]GET [path]/[filename][unurl]%0D%0A[/unurl][/TCPSend][/writefile] [/TCPConnect] The resulting file (as Alain also pointed out), would contain the HTTP resonse headers. Would this not corrupt the image file? -----Original Message----- From: Scott Anderson [mailto:Sanderson@smithmicro.com] Sent: Thursday, January 22, 2004 9:45 AM To: WebDNA-Talk@talk.smithmicro.com Subject: Re: TcpConnect get files on ver. 5.x BUG BUG BUG Actually, taking a second look at these posts, I do not think you can use TCPConnect/TPSend to retrieve binary data. The internal buffers only handle ASCII data and will truncate after the first NULL character. Which is probably why you only get the gif header. It has always been like this. I do not see how this could have worked for any WebDNA version. -----Original Message----- From: Gary Krockover [mailto:gary@garykrockover.com] Sent: Thursday, January 22, 2004 9:01 AM To: WebDNA-Talk@talk.smithmicro.com Subject: Re: TcpConnect get files on ver. 5.x BUG BUG BUG I don't have 4.x installed here anywhere to test, but can confirm the same issue in 5.1e developer on Win2k. It does start to pull down a test image file, I see the gif89a header, but the file is incomplete. GK At 09:34 AM 1/22/2004, you wrote: >Ok - I have now tried every possible way of executing the code - And I can >only come the the conclusion that it must at bug in WebDNA version 5 - so >we can't convert to version 5.X before this is fixed. > >Is there a system for reporting bugs? o > >Regards >Morten ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ "Scott Anderson"

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:

WebCat ignoring Shopping Cart Folder (2001) [WebDNA] lists opinion (2009) Include a big block of text (1997) read and write you own cookies with webcat (1997) Color (1997) [WebDNA] products.db (2013) [OT] Theiving B*****ds (2004) Dummy Credit Card Number for debug? (1997) Exclude by date - multiple (1997) HomePage Caution (1997) [WebDNA] Help me install WebDNA (2012) WILDWEBCAT encrypt.tpl submission (1998) WC2b15 File Corruption (1997) Re:Comments Convertion (1998) Running 2 two WebCatalog.acgi's (1996) using a link like http://www.domain.com/username (2000) Help with [search] sort (2003) Some Questions (1997) Help! WebCat2 bug (1997) [shell] stopped ?? (2003)