question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Very odd ordering behavior happening ResponseHeaders.

See original GitHub issue

This 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:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
fehguycommented, Jan 30, 2017

@ahatzz11 A quick scan tells me the issue is most likely in SpringFox but TBH I’m no expert in this codebase.

0reactions
ahatzz11commented, Jan 30, 2017

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found