Structr: badMessage: 400 Unknown version for HttpChannelOverHttp

here is the related google post:

badMessage: 400 Unknown version for HttpChannelOverHttp

I got an exception from status code 400 (unknown version) from httpParser , but I don’t understand what happened and how I can fix this 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); 
+6
source share
1 answer

this message usually occurs if you have a space (or other characters that must be correctly encoded URLs) in the url like fe

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

Right:

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

Hope this helps, Axel

+15
source

Source: https://habr.com/ru/post/973244/


All Articles