There appears to be a bug in the way Furnace is handling headers. I've
attached a simple webapp that demonstrates it. Put this app in a
extra/webapps/badapp directory. Then do:

USE: webapps.badapp
<badapp> main-responder set-global
[ 8888 httpd ] in-thread

>From a shell:

wget -S http://localhost:8888/bad
...
wget -S http://localhost:8888/good

Compare the contents of the Content-Disposition header shown by wget.
In the first case it's a large string of XML. This is wrong. In the
second case it's the text we specified. It appears to be headers that
have a quotation mark in it (").

Here are the two actions to compare:

: do-bad-action ( --  request )
  "<html></html>" "text/html" <content>
  "attachment; filename=\"foo\"" "Content-Disposition" set-header
  ;

: <bad-action> ( -- action )
  <action>
    [ do-bad-action ] >>display ;

: do-good-action ( --  request )
  "<html></html>" "text/html" <content>
  "attachment; filename=foo" "Content-Disposition" set-header
  ;

: <good-action> ( -- action )
  <action>
    [ do-good-action ] >>display ;

Chris.
-- 
http://www.bluishcoder.co.nz

Attachment: badapp.factor
Description: Binary data

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to