[ https://issues.apache.org/jira/browse/HTTPCORE-760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17772921#comment-17772921 ]
Mr.Z commented on HTTPCORE-760: ------------------------------- I think it's a formatting issue, and similarly, the *PDF* version also has this issue. When I was reading the document, it caused me trouble, and I directly looked at the source code. > An error occurred in the HttpClient 4.5 Tutorial document > --------------------------------------------------------- > > Key: HTTPCORE-760 > URL: https://issues.apache.org/jira/browse/HTTPCORE-760 > Project: HttpComponents HttpCore > Issue Type: Improvement > Components: Documentation > Affects Versions: 4.4.16 > Reporter: Mr.Z > Priority: Minor > Attachments: image-2023-10-07-14-25-21-904.png > > Original Estimate: 1h > Remaining Estimate: 1h > > 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] > ) > {code: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]); > } > } {code} > HttpClient 4.5 Tutorial output result written in the document is: > {code:java} > c1 = a > path=/ > domain=localhost > c2 = b > path=/ > c3 = c > domain=localhost {code} > This is incorrect, the correct output should be: > {code:java} > c1 = a > path=/ > domain=localhost > c2 = b > path=/ > c3 = c > domain=localhost {code} > 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 -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org