Re: [fossil-users] Fossil CGI problem

2011-01-17 Thread Kulcsár Ferenc

 Any reason for not using one of the established web servers that
 actually implement the specs correctly? E.g. with nginx you can either
 hook up fossil http via inetd or directly proxying fossil server.

If I understand it correctly fossil uses non-parsed headers in its answers
(runs as a non-pased header script). In the CGI 1.1 specification you can
find this:

5
5.1
NPH Scripts
Identification
The server MAY support NPH (Non-Parsed Header) scripts; these are scripts
to which the server passes all responsibility for response processing.

Bauk didn't imlpement it - if I got that right - but that's right because
the specs are implemented correctly.

I like Bauk and its features and won't install other servers/applications.

Regards,
Feri

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil CGI problem

2011-01-17 Thread Richard Hipp
2011/1/17 Kulcsár Ferenc crusa...@netbsd.hu


 If I understand it correctly fossil uses non-parsed headers in its answers
 (runs as a non-pased header script).


I don't think so.  The webserver on the http://www.fossil-scm.org/ website
does not support non-parsed headers but it supports Fossil just fine.

I suppose the previous sentence depends on your definition of non-parsed
headers.  The webserver at http://www.fossil-scm.org/ certainly does look
at and parse the result it receives from CGI prior to relaying it back to
the requester.



-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil CGI problem

2011-01-17 Thread Joerg Sonnenberger
On Mon, Jan 17, 2011 at 09:32:22AM +0100, Kulcsár Ferenc wrote:
 
  Any reason for not using one of the established web servers that
  actually implement the specs correctly? E.g. with nginx you can either
  hook up fossil http via inetd or directly proxying fossil server.
 
 If I understand it correctly fossil uses non-parsed headers in its answers
 (runs as a non-pased header script). In the CGI 1.1 specification you can
 find this:

No. Fossil depends on the server implementing 6.3 of RFC 3875
faithfully. Bauk adds a header that the CGI doesn't support (which is
bogus for POST requests) and it drops a header that the CGI created
(content-length). The latter is actually a big no-no for any web server.

Joerg
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil CGI problem

2011-01-16 Thread Joerg Sonnenberger
On Fri, Jan 14, 2011 at 12:22:51PM +0100, Kulcsár Ferenc wrote:
 I'm trying to get fossil setup on a Linux box with Bauk webserver.

Any reason for not using one of the established web servers that
actually implement the specs correctly? E.g. with nginx you can either
hook up fossil http via inetd or directly proxying fossil server.

Joerg
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil CGI problem

2011-01-16 Thread Laurens Van Houtven
For the people potentially checking out the Twisted script -- the
ticket with the bug just got fixed upstream, so there's basically a
one-release window where it was broken (10.2.0).


cheers
lvh
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil CGI problem

2011-01-15 Thread Kulcsár Ferenc
I got in touch with the Bauk's developers. It is a long forum thread about
this problem here:
http://bauk.ws/forum.jsx?a=browsetid=2

Can you help me with this?

TIA,
feri

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil CGI problem

2011-01-15 Thread Joerg Sonnenberger
On Fri, Jan 14, 2011 at 12:22:51PM +0100, Kulcsár Ferenc wrote:
 Hello,
 
 I'm trying to get fossil setup on a Linux box with Bauk webserver. It's
 partly successful. I can point to my repo and administer it. The checkout
 is failing:
 
 $ fossil clone http://archlap.aneder.hu/fossil/proba1 proba1.fossil
 --httptrace
 Bytes  Cards  Artifacts Deltas
 Sent:  53  1  0  0
 fossil: server did not reply

There are at least two issues with the behavior of the server. First, it
is adding Accept-Ranges, even though the CGI didn't say so. As the
original request is a POST, this is just a bug in the server. Second and
more important, it seems to drop the content-length header from the cgi
output.

Joerg
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Fossil CGI problem

2011-01-14 Thread Kulcsár Ferenc
Hello,

I'm trying to get fossil setup on a Linux box with Bauk webserver. It's
partly successful. I can point to my repo and administer it. The checkout
is failing:

$ fossil clone http://archlap.aneder.hu/fossil/proba1 proba1.fossil
--httptrace
Bytes  Cards  Artifacts Deltas
Sent:  53  1  0  0
fossil: server did not reply

The debug files are attached.

Any ideas?

TIA
feri

HTTP/1.1 200 OK
Server: Bauk/2.0.19
Accept-Ranges: bytes
Date: Fri, 14 Jan 2011 09:27:46 GMT
Connection: close
Content-Type: application/x-fossil-uncompressed; charset=utf-8
Cache-Control: no-cache, no-store

cfile 6e5087ac955f16aee6b0e84ba5b3d9a331541231 161 151
¡xœÌ9ƒ0@ÑÞ§˜ÉҌmÌ8mr€(MDã
a¬HÁí³”ÿÿ¥–½øç°ååµÃ§gYª¸€B‰$I÷ŠNšOŠÅUÜ 
J“ã1(4Ù1¢sœãÈFuYôЄÕ×8Aûú®óO¶c‘ÿ€FÜaÌk ŸBëBbk}7Îúè½o­E­mçÄÖÛ-a
clone_seqno 0
push fc6203988173a997794cf732fcbaf0a91a7fdf76 
709f51faeb0e3ab71a8640f59b43629813ee8c3a
# timestamp 2011-01-14T09:27:46POST /fossil/proba1/xfer/xfer HTTP/1.0
Host: archlap.aneder.hu
User-Agent: Fossil/[356e877cea]
Content-Type: application/x-fossil-debug
Content-Length: 53

clone 3 1
# 8BB3878C636B992E809121954B35AE35D1EE2F03___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil CGI problem

2011-01-14 Thread Laurens Van Houtven
That hostname isn't supposed to be internet-accessible, is it?

I've written an admittedly ad-hoc Twisted script which sort-of works
(depending on versions, you might get a duplicate Content-Type, which,
depending on browser (ie Chrome), may mean the CSS doesn't work). If
you want, you can try that, perhaps we can compare responses to see
what goes wrong.


cheers
lvh
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil CGI problem

2011-01-14 Thread Laurens Van Houtven
I do wonder why there aren't any newlines. Was that lost in the paste,
or is that really what Bauk produces as a response?

If my spec-memory is correct, HTTP defines a newline as a CR LF,
there's supposed to be one after each header, and the request ends
with a double newline. I can't see that in the paste. It's possible,
that Fossil, like Chrome is less forgiving of bogus input? (I can
hardly blame it, Accept and cookie-specific headers are already
difficult enough to parse without having to guess where they end...)


cheers
lvh
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil CGI problem

2011-01-14 Thread Kulcsár Ferenc
You can access my host now: http://crusader.dyndns.info/fossil/proba1/index

In mcedit each lines in the files are ended with ^M.

Thanks.
feri

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil CGI problem

2011-01-14 Thread Laurens Van Houtven
If I'm reading src/http.c correctly, that basically only happens if
iLength remains set to its original value of -1, so the response is
probably accurate. My best guess is that it's either a Bauk bug or
misconfiguration issue. Unfortunately I've never heard of Bauk, so I
can't really help you there.

I have added a smaller version of my twisted script[1] which may help
you unless you really need to use Bauk. Fair word of warning: maybe be
flakey with some clients in latest version of twisted because of a
http header regression[2]). Edit lines 17 and 18. Put your fossil repo
in repositories/Yourname.fossil, along with a file Yourname.cgi, which
just contains:

repository: Yourname.fossil

(Twisted will already run this with fossil, if fossil is on your
PATH.) Run python script.py, and you can access your repo at
http://localhost:8080/Yourname (the name it's available under is the
first argument to root.putChild on line 18)

[1]
http://www.bpaste.net/show/12921/

[2]
Ticket: http://twistedmatrix.com/trac/ticket/4786
Workaround (may not be necessary depending on client): comment out
twisted/web/server.py, line 118 :
http://twistedmatrix.com/trac/browser/tags/releases/twisted-10.2.0/twisted/web/server.py#L118

cheers
lvh
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users