jira-importer opened a new issue, #1333: URL: https://github.com/apache/httpcomponents-core/issues/1333
**[Mr.Z](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=hello2050)** opened **[HTTPCORE-760](https://issues.apache.org/jira/browse/HTTPCORE-760?redirect=false)** and commented Dear Apache HttpClient team, I would like to report a bug in the documentation for Apache HttpClient. Specifically, I have found an error in the section on {_}*1.1.3. Working with message headers*{_}.(link: https://hc.apache.org/httpcomponents-client-4.5.x/current/tutorial/html/fundamentals.html ) ```java HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK"); response.addHeader("Set-Cookie", "c1=a; path=/; domain=localhost"); response.addHeader("Set-Cookie", "c2=b; path=\"/\", c3=c; domain=\"localhost\"");HeaderElementIterator it = new BasicHeaderElementIterator( response.headerIterator("Set-Cookie"));while (it.hasNext()) { HeaderElement elem = it.nextElement(); System.out.println(elem.getName() + " = " + elem.getValue()); NameValuePair[] params = elem.getParameters(); for (int i = 0; i < params.length; i++) { System.out.println(" " + params[i]); } } ``` HttpClient 4.5 Tutorial output result written in the document is: ```java c1 = a path=/ domain=localhost c2 = b path=/ c3 = c domain=localhost ``` This is incorrect, the correct output should be: ```java c1 = a path=/ domain=localhost c2 = b path=/ c3 = c domain=localhost ``` Could you please fix the format display? This may cause trouble for developers. Here are the pictures: !image-2023-10-07-14-25-21-904.png! Thank you for your attention to this matter. Sincerely --- **Affects:** 4.4.16 **Attachments:** - [image-2023-10-07-14-25-21-904.png](https://issues.apache.org/jira/secure/attachment/13063396/image-2023-10-07-14-25-21-904.png) (_83.49 kB_) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
