xproc / 3.0-steps

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

Report the base URI in the report output #487

Closed ndw closed 3 years ago

ndw commented 3 years ago

In the course of debugging my p:http-request step and discussing the various test outcomes with @xml-project, the following observation was made:

If a request produces no documents, it's impossible to tell what the final URI was. In particular, consider the case where you've set follow-redirect to 2 but the request redirects more than twice. There's no output so there's no document from which you can get the base URI, so there's no way to know what the last redirect location was.

The simple fix seems to be to add this information to the report output. It seems reasonable, it's trivial to implement, and it does mean pipeline authors can rely on reading the value irrespective of whether or not a document was produced.