Very odd ordering behavior happening ResponseHeaders.
See original GitHub issueThis is a duplicate from #2048, but that issue seems to have been abandoned. There is something odd going on with the ordering of response headers.
I am on version 1.5.12
@ApiResponses(
value = {
@ApiResponse(code = 200,
message = "OK",
responseHeaders = {
@ResponseHeader(name = "A-X-RateLimit-Limit", description = "The defined maximum number of requests available to the consumer for this API.", response = Integer.class),
@ResponseHeader(name = "B-X-RateLimit-Remaining", description = "The number of calls remaining before the limit is enforced and requests are bounced.", response = Integer.class),
@ResponseHeader(name = "C-X-RateLimit-Reset", description = "The time, in seconds, until the limit expires and another request will be allowed in. This header will only be present if the limit is being enforced.", response = Integer.class)
}
)
})
Here is the JSON output:
"responses":{
"200":{
"description":"OK",
"schema":{
"type":"object"
},
"headers":{
"C-X-RateLimit-Reset":{
"type":"integer",
"format":"int32",
"description":"The time, in seconds, until the limit expires and another request will be allowed in. This header will only be present if the limit is being enforced."
},
"B-X-RateLimit-Remaining":{
"type":"integer",
"format":"int32",
"description":"The number of calls remaining before the limit is enforced and requests are bounced."
},
"A-X-RateLimit-Limit":{
"type":"integer",
"format":"int32",
"description":"The defined maximum number of requests available to the consumer for this API."
}
}
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ResponseHeaders do not preserve lexical ordering #1651
I'm not sure what is happening, but it doesn't seem to be preserving the order. All reactions.
Read more >ASP.Net Core: X-Frame-Options strange behavior
If I press F5 the header is no longer in the response and everything works as it should. That happens only with X-Frame-Options...
Read more >Bloated Request & Response Headers
When a browser makes an HTTP request, it sends along a slew of request headers. Take a look at what some request headers...
Read more >Set-Cookie Headers getting stripped in ASP.NET HttpHandlers
Bizzaro Land: Response.ClearHeaders() causes Cookie to get stripped. Now, here is where it really gets bizarre: The problem occurs only if:.
Read more >Caching Header Best Practices - Simon Hearne
Caching headers are surprisingly complex and often misconfigured. Here we look at some key cache scenarios and recommend the ideal headers ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ahatzz11 A quick scan tells me the issue is most likely in SpringFox but TBH I’m no expert in this codebase.
That’s what I feared. I’ve had a few issues that have kinda been abandoned over there, maybe I’ll try again with this one. Thanks!