Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

structr: badMessage: 400 Unknown Version for HttpChannelOverHttp

here the related post on google:

badMessage: 400 Unknown Version for HttpChannelOverHttp

I got an exception with status code 400 (unknown version) from httpParser, but i don't understand what happened and how i can fix the problem. What is the Reason for this Exception? The Code says: version == null

here is the code:

String version=takeString();
_version=HttpVersion.CACHE.get(version);
if (_version==null)
  throw new BadMessage(HttpStatus.BAD_REQUEST_400,"Unknown Version");
setState(State.SPACE1);
like image 793
diel2001 Avatar asked Aug 01 '14 20:08

diel2001


1 Answers

this message usually occurs if you have a whitespace (or other characters which have to be URL-encoded properly) in the URL, like f.e.

curl "http://0.0.0.0:8082/structr/rest/users?name=A B"

Correct:

curl "http://0.0.0.0:8082/structr/rest/users?name=A%20B"

Hope that helps, Axel

like image 174
Axel Morgner Avatar answered Jan 04 '23 12:01

Axel Morgner