[PATCH stable] hgweb.cgi: fix internal WSGI emulation (issue3804)

Mads Kiilerich mads at kiilerich.com
Mon Feb 4 11:51:38 CST 2013


On 02/04/2013 06:18 PM, Kevin Bullock wrote:
> On Feb 4, 2013, at 9:51 AM, Mads Kiilerich wrote:
>
>> # HG changeset patch
>> # User Mads Kiilerich <madski at unity3d.com>
>> # Date 1359993046 -3600
>> # Branch stable
>> # Node ID 8fff1e69052818a40110eb00589742dd40bd2fde
>> # Parent  12de53323e59ce3e5f31472ee781649669d6ca9c
>> hgweb.cgi: fix internal WSGI emulation (issue3804)
> Looks good, but:

Oops - I just _knew_ that we didn't have test coverage for this - 
otherwise we would have caught it ;-) Will fix.

> --- /home/kbullock/hg/hg/tests/test-hgweb-commands.t
> +++ /home/kbullock/hg/hg/tests/test-hgweb-commands.t.err
> @@ -1377,12 +1377,20 @@
>     $ PATH_INFO=/bookmarks; export PATH_INFO
>     $ QUERY_STRING='style=raw'
>     $ python hgweb.cgi
> +  Status: 200 Script output follows\r (esc)
> +  ETag: 1359997449.25\r (esc)
> +  Content-Type: text/plain; charset=ascii\r (esc)
> +  \r (esc)
>   
>   listbookmarks hides secret bookmarks
>   
>     $ PATH_INFO=/; export PATH_INFO
>     $ QUERY_STRING='cmd=listkeys&namespace=bookmarks'
>     $ python hgweb.cgi
> +  Status: 200 Script output follows\r (esc)
> +  Content-Type: application/mercurial-0.1\r (esc)
> +  Content-Length: 0\r (esc)
> +  \r (esc)
>   
>   search works with filtering
>   
>
> ERROR: /home/kbullock/hg/hg/tests/test-hgweb-commands.t output changed
>
> I had thought, when I added those tests to test-hgweb-commands.t, that it was a bit odd that they weren't returning _anything_, even headers. Guess I was right.

Heh, yeah, I also remember wondering about that a bit ... but added 2 
and 2 and got 0 ;-)

/Mads



More information about the Mercurial-devel mailing list