Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch Request JSON Body Should not include 'Authorization' header #1483

Closed
ramsessanchez opened this issue Feb 8, 2024 · 0 comments · Fixed by #1484
Closed

Batch Request JSON Body Should not include 'Authorization' header #1483

ramsessanchez opened this issue Feb 8, 2024 · 0 comments · Fixed by #1484
Assignees

Comments

@ramsessanchez
Copy link
Contributor

ramsessanchez commented Feb 8, 2024

When creating a BatchRequestStep via getRequestInformation in the SDK we are writing the 'Authorization' header which includes a very very long header. When testing, this header value was over 3k characters long. This is causing the following lines to take too long:

try(final PipedOutputStream out = new PipedOutputStream(in)) {
            outputStream.writeTo(out);
            return in;
        }

In order to avoid this, when adding the headers of a batchRequestStep the 'authorization' header should not be included.
Example:

//Original JSON 
{ 
    "requests" : [
        { 
            "id": "123", 
            "url": "/me", 
            "method": "GET", 
            "headers": { 
                "authorization": "Bearer String 3k chars in length", 
                "accept": "application/json" 
            } 
        }
    ]
} 
// Solution JSON
{ 
    "requests" : [
        { 
            "id": "123", 
            "url": "/me", 
            "method": "GET", 
            "headers": { 
                "accept": "application/json" 
            } 
        }
    ]
}   
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant