xproc / 3.0-steps

Repository for change requests to the standard step library and for official extension steps
10 stars 7 forks source link

I'm unsure about err:XC0129 #486

Closed ndw closed 2 years ago

ndw commented 3 years ago

To save you looking it up:

The http-version parameter indicates which version of HTTP must be used for the request. It is a dynamic error (err:XC0129) if the requested HTTP version is not supported.

I don't believe this is something the processor can know. Only the server knows what version(s) it supports. If there's a server out there that supports HTTP 2.0 or HTTP 3.0 or HTTP 99.9, who are we to refuse to send requests to it?

I believe the server is responsible for returning a 400 error if the requested version is not acceptable.

xml-project commented 3 years ago

Just a reminder if the error is removed: Test "ab-http-request-108" is expected to raise XC0129

xml-project commented 3 years ago

I am not sure what the motiviation for XC0129 was. In my implementation I took it to be a statement about the client, no the server. So if you use http-version=9999, you will get an error because my implementation does not know how to send a request for this version or how to handle a response. Does this make any sense?

ndw commented 3 years ago

I bet it does. The HTTP protocol just says you put the version in the first line of the request. Or in my case tell the underlying client what version to use.

I don't feel strongly about it. Version 99 is almost certainly user error.