From: tom.rmadilo on
On Jun 16, 9:46 am, Giorgio Valoti <giorgi...(a)me.com> wrote:
> On 2010-06-16 18:21:53 +0200, tom.rmadilo said:
>
>
>
>
>
> > On Jun 16, 8:37 am, Giorgio Valoti <giorgi...(a)me.com> wrote:
> >> Hi all,
> >> I’m getting a very weird bug(?) with tclhttpd.
>
> >> On Mac OS X, I’ve unwrapped the latest tclhttpd starkit distribution
> >> and replaced the htdocs directory with mine; wrapped everything and
> >> copied it onto a Win XP box. If I try to download a .swf file nothing
> >> happens: tclhttp is still responsive but the request just hangs there.
> >> However, if I start it with the -docRoot flag everything works as
> >> expected!
>
> >> On Mac OS X works correctly, either using the starkit docroot or an
> >> external one. Every other file type (text, movies) are served correctly
> >> regardless the OS and the docroot used.
>
> >> I’m banging my head against the wall... Does anyone have any suggestion?
>
> > Not an expert on tclhttpd, but a few questions:
>
> > * Can you use wget/curl to download a fake .swf file, a real .swf
> > file?
>
> I’ve used curl with the real .swf and it hangs after having received
> the headers.
>
> > * or Is the problem that an .swf application cannot access the .swf
> > file?
> > * What is wrong with using the -docRoot flag if this makes everything
> > work?
>
> According to the requirements the final app should be distributed as a
> starpack, so everything should be self-contained.
>
>
>
> > Some web servers use OS based mapping files to serve content, it is
> > possible that XP doesn't have the correct mapping, or the file is
> > missing or doesn't exist on XP, or your particular OS installation. (I
> > know some perl scripts do this).
>
> Since starkits use vfs this shouldn’t be a problem. Also, this would
> explain why using a regular directory with -docRoot doesn’t show any
> problem.

Sometimes I use telnet (from linux/unix) to actually test buggy
applications,
wget/curl are sometimes just too smart.

Also: what are the headers?

Another thing to test is just copying the file and changing the file
extension to something likely unused: .sswwff. Compare the headers
received. Web servers and clients should handle any content it doesn't
understand as binary data */*. Some clients peek at the content, some
peek at the file extension, but I think the correct behavior is to
consult the headers content-type, etc. My guess is that it is a
combination of local configuration and server/client mismatch.


From: Giorgio Valoti on
On 2010-06-16 18:53:10 +0200, Giorgio Valoti said:

> On 2010-06-16 18:46:14 +0200, Giorgio Valoti said:
>
>> […]
>>>
>>> * Can you use wget/curl to download a fake .swf file, a real .swf
>>> file?
>>
>> I've used curl with the real .swf and it hangs after having received
>> the headers.
>
> Just tried with a fake swf. Same results


And it's worse than that. I took a step back and tried the standard
starkit distribution. The home page is shown as expected, however, the
gif spacer under htdocs/images/Space.gif hangs (same as “my” .swf
files).

Then I tried to:
- add a copy of htdocs/links/README.txt as htdocs/links/LEGGIMI.txt: OK
- add a copy of htdocs/links/README.txt as htdocs/links/test.txt: OK
- edit test.txt deleting all the content except the first paragraph: OK
- same thing except the first 65 chars: OK
- same thing except the first 64 chars: HANGS

And guess what? The Space.gif it's a 49 byte file

So I put a copy of one of the SWFs, which is way bigger than 64B, under
htdocs/links and… it hangs as well.

--
Giorgio Valoti

From: Kroc on
Here is what I've tried on Mac OS X (10.6.4):

wget http://www.tcl.tk/starkits/tclhttpd.kit
wget http://www.kroc.tk/fichiers/tclkit-cli.zip
unzip tclkit-cli.zip
wget http://www.flashanywhere.net/content/file/24700/Vuvuzela-Button.swf
../tclkit-cli tclhttpd.kit -docRoot .

Then I browse to http://localhost:8015/ with Safari and when click on
Vuvuzela-Button.swf it works as expected.

--
David Zolli
From: tom.rmadilo on
On Jun 17, 12:44 am, Giorgio Valoti <giorgi...(a)me.com> wrote:
> On 2010-06-16 18:53:10 +0200, Giorgio Valoti said:
>
> > On 2010-06-16 18:46:14 +0200, Giorgio Valoti said:
>
> >> […]
>
> >>> * Can you use wget/curl to download a fake .swf file, a real .swf
> >>> file?
>
> >> I’ve used curl with the real .swf and it hangs after having received
> >> the headers.
>
> > Just tried with a fake swf. Same results
>
> And it’s worse than that. I took a step back and tried the standard
> starkit distribution. The home page is shown as expected, however, the
> gif spacer under htdocs/images/Space.gif hangs (same as “my” .swf
> files).
>
> Then I tried to:
> - add a copy of htdocs/links/README.txt as htdocs/links/LEGGIMI.txt: OK
> - add a copy of htdocs/links/README.txt as htdocs/links/test.txt: OK
> - edit test.txt deleting all the content except the first paragraph: OK
> - same thing except the first 65 chars: OK
> - same thing except the first 64 chars: HANGS
>
> And guess what? The Space.gif it’s a 49 byte file
>
> So I put a copy of one of the SWFs, which is way bigger than 64B, under
> htdocs/links and… it hangs as well.

Until you use something like telnet, or Tcl's socket to try a raw
request, and show us what you typed and the full result, it is hard to
help much further. From what I understand, it isn't hanging, it is
just returning some headers. Telnet will maybe show some data getting
sent.


From: Giorgio Valoti on
On 2010-06-17 17:15:04 +0200, Kroc said:

> Here is what I've tried on Mac OS X (10.6.4):
>
> wget http://www.tcl.tk/starkits/tclhttpd.kit
> wget http://www.kroc.tk/fichiers/tclkit-cli.zip
> unzip tclkit-cli.zip
> wget http://www.flashanywhere.net/content/file/24700/Vuvuzela-Button.swf
> ./tclkit-cli tclhttpd.kit -docRoot .
>
> Then I browse to http://localhost:8015/ with Safari and when click on
> Vuvuzela-Button.swf it works as expected.

Have you tried it under a Window box?

--
Giorgio Valoti