Arc Forumnew | comments | leaders | submitlogin
HTTP header case bug
4 points by tung 6136 days ago | 4 comments
I was using Anarki and playing around with the Arc web server, but I noticed that submitting forms using emacs-w3m produced the error: "Post request without Content-Length." Studying the headers sent by w3m and comparing them to the same sent by Firefox, I traced it back to the parseheader function in srv.arc.

The problem was the case of the HTTP header fields sent by w3m: "Content-length" rather than the "Content-Length" that Arc expected. I checked RFC 2616 (HTTP/1.1), and according to section 4.2, "Field names are case-insensitive." I altered srv.arc to reflect this.

I just pushed the change into the public repo, according to the instructions here: http://arclanguage.org/item?id=3849 . I checked the logs, and there seems to be a couple of extra merge commit messages. Is there any way to avoid that in future? I'm new to git.



1 point by sjs 6135 days ago | link

NB: I am a total git noob and you shouldn't listen to anything I say.

When I pull I do `git pull --rebase' which avoids the merge commits. I'm not sure what the interactive (-i) switch to git rebase does (I have a good idea though), but the default place to pull from is origin/master (afaik) so they're probably quite similar.

-----

1 point by tung 6135 days ago | link

Thanks. The merge log messages are technically accurate, but they seem like the sort of thing that would clutter the history.

-----

1 point by almkglor 6135 days ago | link

Supposedly you can use the "git rebase -i origin/master" command as described in the CONVENTIONS file. It doesn't seem to work on me, however; I get the message "Usage: /usr/bin/git-rebase [-v] [--onto <newbase>] <upstream> [<branch>]"; looking at my online documentation does not reveal a -i option. ^^

-----

1 point by sjs 6135 days ago | link

You probably need a newer git. People recommend using git HEAD and I haven't had problems with it so far.

  cd ~/src
  git clone git://git.kernel.org/pub/scm/git/git.git
  cd git
  make prefix=$HOME/apps all doc info
  make prefix=$HOME/apps install install-doc install-info

-----