-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Optional header field when reset results in empty header value #4587
Copy link
Copy link
Closed
Description
Q&A (please complete the following information)
- OS: any
- Browser: any
- Method of installation: npm
- Swagger-UI version: 3.15.0
- Swagger/OpenAPI version: OpenAPI 3.0
Content & configuration
Example Swagger/OpenAPI definition:
Describe the bug you're encountering
Have a request with optional header /sql/ where once the header is set it works fine, but once it is reset to empty then an emtpy header is being sent every time.
To reproduce...
Steps to reproduce the behavior:
- Go to
sqlGET and execute query without headerx-irest-conn(x-irest-connis an optional header). - Try a GET with a header value for
x-irest-conn - Remove the value for
x-irest-connthe request now is executed with emptyx-irest-conn -H "x-irest-conn: "this is seen in the curl command.- Initial request works fine. Problem arises once the header field is reset to empty.
Expected behavior
When the header field is empty no header should be sent since it is configured as optional
Screenshots
Reactions are currently unavailable
