It certainly *looks* like the middleware makes two requests: one with env, and one with orig_env. The orig_env response gets delivered back to the client, but the env response gets dropped on the floor -- without even trying to close the iterator that was returned.
With the pipeline '... proxy-logging logger-499 proxy-server' only one request/response goes through the proxy-logging, so you only get one log line; with '... logger-499 proxy-logging proxy-server' both requests/responses are properly logged. I expect the object-server logs would have confirmed that there were two requests regardless of pipeline order -- one that would succeed with 200 and one that would 499 because the "client" (i.e., the proxy-server) stopped reading.
As I understand it, subrequest logging like this is part of why we started recommending that you include proxy-logging at both the start and end of the pipeline, and putting most middleware between them. See https://github.com/openstack/swift/commit/a622349, which was included in 1.8.0.
It certainly *looks* like the middleware makes two requests: one with env, and one with orig_env. The orig_env response gets delivered back to the client, but the env response gets dropped on the floor -- without even trying to close the iterator that was returned.
With the pipeline '... proxy-logging logger-499 proxy-server' only one request/response goes through the proxy-logging, so you only get one log line; with '... logger-499 proxy-logging proxy-server' both requests/responses are properly logged. I expect the object-server logs would have confirmed that there were two requests regardless of pipeline order -- one that would succeed with 200 and one that would 499 because the "client" (i.e., the proxy-server) stopped reading.
As I understand it, subrequest logging like this is part of why we started recommending that you include proxy-logging at both the start and end of the pipeline, and putting most middleware between them. See https:/ /github. com/openstack/ swift/commit/ a622349, which was included in 1.8.0.