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

status code: 414, reason phrase: Request-URI Too Large #462

Open
GridxFuJun opened this issue Jul 10, 2020 · 0 comments
Open

status code: 414, reason phrase: Request-URI Too Large #462

GridxFuJun opened this issue Jul 10, 2020 · 0 comments

Comments

@GridxFuJun
Copy link

org.apache.http.client.HttpResponseException: status code: 414, reason phrase: Request-URI Too Large at com.offbytwo.jenkins.client.validator.HttpResponseValidator.validateResponse(HttpResponseValidator.java:11) at com.offbytwo.jenkins.client.JenkinsHttpClient.post(JenkinsHttpClient.java:261) at com.offbytwo.jenkins.model.Job.build(Job.java:151) at com.offbytwo.jenkins.model.Job.build(Job.java:113)

when build job with params, The parameter is a very long value, there will be the following error.In the source code, although the operation is a post request, he stitched the parameters on the url.

public QueueReference build(Map<String, String> params, Map<String, File> fileParams, boolean crumbFlag) throws IOException { String qs = join(Collections2.transform(params.entrySet(), new MapEntryToQueryStringPair()), "&"); ExtractHeader location = client.post(url + "buildWithParameters?" + qs,null, ExtractHeader.class, fileParams, crumbFlag); return new QueueReference(location.getLocation()); }

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

No branches or pull requests

1 participant