for-GET / http-decision-diagram

An activity diagram to describe the resolution of HTTP response status codes, given various headers.
https://github.com/for-GET/http-decision-diagram/blob/master/doc/2013-06-10-http-hell-no.md
Apache License 2.0
3.63k stars 196 forks source link

Wrong header format? #60

Closed KillerBoogie closed 2 years ago

KillerBoogie commented 2 years ago

I miss in this great digram how to deal with wrong formatted headers, e.g. Etag is in incorrect format or Since-Modified is not a correct date.

andreineculau commented 2 years ago

In your case, you want to check if the request headers are valid. If invalid, return false on is_request_block_ok and the response will be 400 Bad Request.

Hope it helps.