10

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);
condit
  • 10,852
  • 2
  • 41
  • 60
diel2001
  • 131
  • 1
  • 5

1 Answers1

23

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

Axel Morgner
  • 2,292
  • 16
  • 15