Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server sends bad request when there is no whitespace in http header #5606

Closed
mariusre opened this issue Nov 18, 2019 · 0 comments
Closed

server sends bad request when there is no whitespace in http header #5606

mariusre opened this issue Nov 18, 2019 · 0 comments

Comments

@mariusre
Copy link
Contributor

mariusre commented Nov 18, 2019

Hey there,

the server replies "Bad Request" when there is no whitespace between header-key and value.
Here is an example:

curl -v -H 'Accept:*/*' '192.168.178.144:8081/table/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219'

Results in:

*   Trying 192.168.178.144...
* TCP_NODELAY set
* Connected to 192.168.113.144 (192.168.178.144) port 8081 (#0)
> GET /table/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219 HTTP/1.1
> Host: 192.168.178.144:8081
> User-Agent: curl/7.58.0
> Accept:*/*
> 
* HTTP 1.0, assume close after body
< HTTP/1.0 400 Bad Request
< Access-Control-Allow-Origin: *
< Content-Length: 0
< Content-Type: text/html
< 
* Closing connection 0

But this is working:

curl -v -H 'Accept: */*' '192.168.178.144:8081/table/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219'

The only difference between the two requests is one whitespace in the Accept-header. This whitespace is optional. For reference see here (in 3.2).
So the server should be able to deal with requests without whitespace in headers.

datendelphin added a commit to fossgis-routing-server/osrm-backend that referenced this issue Nov 19, 2020
  - Changes from 5.22.0
    - Build:
      - FIXED: pessimistic calls to std::move [Project-OSRM#5560](Project-OSRM#5561)
    - Features:
      - ADDED: new API parameter - `snapping=any|default` to allow snapping to previously unsnappable edges [Project-OSRM#5361](Project-OSRM#5361)
      - ADDED: keepalive support to the osrm-routed HTTP server [Project-OSRM#5518](Project-OSRM#5518)
      - ADDED: flatbuffers output format support [Project-OSRM#5513](Project-OSRM#5513)
      - ADDED: Global 'skip_waypoints' option [Project-OSRM#5556](Project-OSRM#5556)
      - FIXED: Install the libosrm_guidance library correctly [Project-OSRM#5604](Project-OSRM#5604)
      - FIXED: Http Handler can now deal witch optional whitespace between header-key and -value [Project-OSRM#5606](Project-OSRM#5606)
    - Routing:
      - CHANGED: allow routing past `barrier=arch` [Project-OSRM#5352](Project-OSRM#5352)
      - CHANGED: default car weight was reduced to 2000 kg. [Project-OSRM#5371](Project-OSRM#5371)
      - CHANGED: default car height was reduced to 2 meters. [Project-OSRM#5389](Project-OSRM#5389)
      - FIXED: treat `bicycle=use_sidepath` as no access on the tagged way. [Project-OSRM#5622](Project-OSRM#5622)
      - FIXED: fix table result when source and destination on same one-way segment. [Project-OSRM#5828](Project-OSRM#5828)
      - FIXED: fix occasional segfault when swapping data with osrm-datastore and using `exclude=` [Project-OSRM#5844](Project-OSRM#5844)
      - FIXED: fix crash in MLD alternative search if source or target are invalid [Project-OSRM#5851](Project-OSRM#5851)
    - Misc:
      - CHANGED: Reduce memory usage for raster source handling. [Project-OSRM#5572](Project-OSRM#5572)
      - CHANGED: Add cmake option `ENABLE_DEBUG_LOGGING` to control whether output debug logging. [Project-OSRM#3427](Project-OSRM#3427)
      - CHANGED: updated extent of Hong Kong as left hand drive country. [Project-OSRM#5535](Project-OSRM#5535)
      - FIXED: corrected error message when failing to snap input coordinates [Project-OSRM#5846](Project-OSRM#5846)
    - Infrastructure
      - REMOVED: STXXL support removed as STXXL became abandonware. [Project-OSRM#5760](Project-OSRM#5760)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants