0

I am running a load test using Locust and have it working fine except I want to get the the sub-status code return in the response. I know the status code is available with response.status_code but I need additional information such as response.sub_status_code. Is this currently available in Locust?

Thanks

RejeeshChandran
  • 4,168
  • 3
  • 21
  • 32
Glenn D
  • 11
  • 1
  • 3

1 Answers1

0

I don't think it's possible. There is no sign of it in a documentation. Anyway, there are some details from another Q&A why substatus is problematic. It's about .Net platform but I found it interesting

See the second-to-last response here: http://www.velocityreviews.com/forums/t73739-sending-status-as-4011.html. The HTTP RFC doesn't define sub-codes (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html). It looks like it may be an MS only thing - see last response in the first link, which then points to here: http://msdn.microsoft.com/en-us/library/system.web.httpresponse.substatuscode.aspx. While that is how to SET the sub- statuscode, not retrieve it, the interesting thing to me is that it is only supported "with the integrated pipeline mode in IIS 7.0 and at least the .NET Framework version 3.0."

The only other thing I can think of is to look into the HRESULT in the ErrorCode property on the HttpException and see if there's something going on at the bit level where you can figure out the code and sub-code from that.

Community
  • 1
  • 1
Piotr Dawidiuk
  • 2,961
  • 1
  • 24
  • 33