Merge lp://staging/~anandjeyahar/beeseek/Fedora12 into lp://staging/beeseek
Proposed by
anandjeyahar
Status: | Merged |
---|---|
Merged at revision: | 101 |
Proposed branch: | lp://staging/~anandjeyahar/beeseek/Fedora12 |
Merge into: | lp://staging/beeseek |
Diff against target: |
114 lines (+16/-15) 5 files modified
doc/source/node/http.txt (+4/-4) doc/source/node/webserver.txt (+3/-3) node/bsnode/http.py (+4/-1) node/bsnode/webserver.py (+1/-4) tools/lint (+4/-3) |
To merge this branch: | bzr merge lp://staging/~anandjeyahar/beeseek/Fedora12 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrea Corbellini | Approve | ||
Review via email: mp+34012@code.staging.launchpad.net |
Description of the change
2 changes. Rev 100 moves that http addition to name from the server to request parser.
Rev 101 fixes a lint bug to stop it from checking the directories too.
To post a comment you must log in.
First of all, thanks for your contribution.
Your branch is good: the code you have changed works as it should and does it jobs. However there are few problems with it. The most important thing that you should do is fixing the tests: in fact, if you run "make check" or just "tools/test-node", you'll notice some failures introduced by your changes. You won't have to change nothing special: just 'USER-AGENT' -> 'HTTP_USER_AGENT' and so on, so it shouldn't be difficult to fix the tests, but please tell me if you have troubles.
There are also a few minor problems with your code:
* You placed the "name = 'HTTP_' + name.replace('-', '_')" inside the try..except block. If an error occurs while concatenating 'HTTP_' with `name`, than it means that there is a bug in our software that we should fix. The error shouldn't pass silently, but instead must raise an exception. It means that you should place the code out of the try..except block.
* Could you please replace 'name.replace(...)' with 'name.upper( ).replace( ...)' (removing the call to upper() in the line below)? This will make things a bit faster (although not significantly), since the prefix 'HTTP_' won't be touched by upper().
* In webserver.py you removed the TODO and the `name = ...` line, and that's good. But with this change now the loop is totally useleess: you can use the update() method of the request_meta dictionary: request_ meta.update( headers) .
This last three problems are actually just nitpicks, but I would like to see the tests fixed before approving the merge.
Thanks,
Andrea