Skip to content

Document Apache HTTP cookie implementations - #527

Open
jonathanpeppers wants to merge 4 commits into
mainfrom
jonathanpeppers-document-apache-http-impl-cookie
Open

Document Apache HTTP cookie implementations#527
jonathanpeppers wants to merge 4 commits into
mainfrom
jonathanpeppers-document-apache-http-impl-cookie

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Summary

  • Replaced all 699 placeholder XML documentation entries in Org.Apache.Http.Impl.Cookie.
  • Added namespace, type, member, parameter, return-value, and binding-infrastructure documentation without changing other namespaces.

Closes#271

Sources

Validation

  • Parsed all 34 scoped XML files successfully.
  • Confirmed zero To be added placeholders in the scoped namespace.
  • Confirmed CRLF line endings and a clean git diff --check.

Closes#271
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces placeholder XML documentation in Org.Apache.Http.Impl.Cookie with descriptive namespace/type/member/parameter/return-value docs, aligning the generated API docs with the underlying Apache HTTP cookie implementations.

Changes:

  • Replaced To be added. placeholders across the Org.Apache.Http.Impl.Cookie namespace.
  • Added/updated summaries, parameter docs, return/value docs, and binding-infrastructure (JNI peer/threshold) documentation.
  • Documented cookie policies/specs (RFC 2109, RFC 2965, Netscape draft, browser-compat, best-match) and related handlers/utilities.

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
docs/xml/Org.Apache.Http.Impl.Cookie/RFC2965VersionAttributeHandler.xmlReplaced placeholders with docs for the RFC 2965 Version attribute handler.
docs/xml/Org.Apache.Http.Impl.Cookie/RFC2965SpecFactory.xmlDocumented factory for creating RFC 2965 cookie specs.
docs/xml/Org.Apache.Http.Impl.Cookie/RFC2965Spec.xmlDocumented RFC 2965 cookie parsing/validation/matching/formatting behavior.
docs/xml/Org.Apache.Http.Impl.Cookie/RFC2965PortAttributeHandler.xmlDocumented RFC 2965 Port attribute parsing/validation/matching.
docs/xml/Org.Apache.Http.Impl.Cookie/RFC2965DomainAttributeHandler.xmlDocumented RFC 2965 Domain attribute parsing/validation/matching.
docs/xml/Org.Apache.Http.Impl.Cookie/RFC2965DiscardAttributeHandler.xmlDocumented RFC 2965 Discard attribute handler members.
docs/xml/Org.Apache.Http.Impl.Cookie/RFC2965CommentUrlAttributeHandler.xmlDocumented RFC 2965 CommentURL attribute parsing and application.
docs/xml/Org.Apache.Http.Impl.Cookie/RFC2109VersionHandler.xmlDocumented RFC 2109 Version attribute parsing/validation behavior.
docs/xml/Org.Apache.Http.Impl.Cookie/RFC2109SpecFactory.xmlDocumented factory for creating RFC 2109 cookie specs.
docs/xml/Org.Apache.Http.Impl.Cookie/RFC2109Spec.xmlDocumented RFC 2109 cookie parsing/validation/matching/formatting behavior.
docs/xml/Org.Apache.Http.Impl.Cookie/RFC2109DomainHandler.xmlDocumented RFC 2109 domain validation/matching rules.
docs/xml/Org.Apache.Http.Impl.Cookie/NetscapeDraftSpecFactory.xmlDocumented factory for creating Netscape draft cookie specs.
docs/xml/Org.Apache.Http.Impl.Cookie/NetscapeDraftSpec.xmlDocumented Netscape draft cookie spec parsing/formatting and related members.
docs/xml/Org.Apache.Http.Impl.Cookie/NetscapeDraftHeaderParser.xmlDocumented Netscape draft header parsing API and default parser instance.
docs/xml/Org.Apache.Http.Impl.Cookie/NetscapeDomainHandler.xmlDocumented Netscape draft domain validation/matching rules.
docs/xml/Org.Apache.Http.Impl.Cookie/DateUtils.xmlDocumented cookie date formatting/parsing utilities and supported date patterns.
docs/xml/Org.Apache.Http.Impl.Cookie/DateParseException.xmlDocumented exception surfaced for unparseable cookie date strings.
docs/xml/Org.Apache.Http.Impl.Cookie/CookieSpecBase.xmlDocumented shared base behavior for parsing/matching/validating cookie specs.
docs/xml/Org.Apache.Http.Impl.Cookie/BrowserCompatSpecFactory.xmlDocumented factory for browser-compatible cookie specs.
docs/xml/Org.Apache.Http.Impl.Cookie/BrowserCompatSpec.xmlDocumented browser-compatible cookie parsing/formatting and date-pattern behavior.
docs/xml/Org.Apache.Http.Impl.Cookie/BestMatchSpecFactory.xmlDocumented factory for best-match cookie spec selection.
docs/xml/Org.Apache.Http.Impl.Cookie/BestMatchSpec.xmlDocumented best-match policy selection and cookie parsing/validation behavior.
docs/xml/Org.Apache.Http.Impl.Cookie/BasicSecureHandler.xmlDocumented Secure attribute parsing/behavior.
docs/xml/Org.Apache.Http.Impl.Cookie/BasicPathHandler.xmlDocumented Path attribute parsing/validation/matching behavior.
docs/xml/Org.Apache.Http.Impl.Cookie/BasicMaxAgeHandler.xmlDocumented Max-Age parsing and expiry-date derivation behavior.
docs/xml/Org.Apache.Http.Impl.Cookie/BasicExpiresHandler.xmlDocumented Expires parsing into a cookie expiry date.
docs/xml/Org.Apache.Http.Impl.Cookie/BasicDomainHandler.xmlDocumented conventional Domain attribute parsing/validation/matching.
docs/xml/Org.Apache.Http.Impl.Cookie/BasicCommentHandler.xmlDocumented Comment attribute parsing/behavior.
docs/xml/Org.Apache.Http.Impl.Cookie/BasicClientCookie2.xmlDocumented RFC 2965 extensions (discard/ports/comment URL) on client cookies.
docs/xml/Org.Apache.Http.Impl.Cookie/BasicClientCookie+InterfaceConsts.xmlDocumented standard attribute-name constants used by client cookies.
docs/xml/Org.Apache.Http.Impl.Cookie/BasicClientCookie.xmlDocumented mutable client cookie behavior, attributes, and helpers.
docs/xml/Org.Apache.Http.Impl.Cookie/AbstractCookieSpec.xmlDocumented base cookie spec dispatch/registration model for attribute handlers.
docs/xml/Org.Apache.Http.Impl.Cookie/AbstractCookieAttributeHandler.xmlDocumented default behavior for cookie attribute handlers (parse/match/validate).
docs/xml/ns-Org.Apache.Http.Impl.Cookie.xmlDocumented the namespace purpose and scope.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threaddocs/xml/Org.Apache.Http.Impl.Cookie/DateUtils.xml
Comment threaddocs/xml/Org.Apache.Http.Impl.Cookie/RFC2965DiscardAttributeHandler.xml Outdated
Comment threaddocs/xml/Org.Apache.Http.Impl.Cookie/RFC2109Spec.xml Outdated
Refs #271
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers

Copy link
Copy Markdown
MemberAuthor

@dalexsoto review

1 similar comment
@jonathanpeppers

Copy link
Copy Markdown
MemberAuthor

@dalexsoto review

@dalexsotodalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Four cookie-contract groups remain incorrect:

  • RFC2109Spec.VersionHeader returns null; Cookie2 is emitted by RFC2965.
  • AbstractCookieSpec.GetAttribHandler throws IllegalStateException when missing, rather than returning null.
  • Several parameter descriptions are copied from unrelated operations (BasicClientCookie, DateUtils.startDate, RFC2109 formatting, RFC2965 domain matching).
  • Five FormatCookies methods return IList<IHeader>, not a single header/value.

Please replace these copied descriptions with the Apache/AOSP implementation-specific contracts.

Refs #271
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers

Copy link
Copy Markdown
MemberAuthor

@dalexsoto review

@dalexsotodalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VersionHeader, GetAttribHandler, and collection-return fixes are correct, but three groups remain:

  • BasicClientCookie expiry-date parameters still describe formatting instead of comparison/assignment.
  • Sixteen other parameter descriptions still identify the wrong input roles across cookie specs and handlers.
  • RFC2965 CommentURL/Discard/Version handlers claim validation or conditional matching although validation is empty and matching is always true; several parsers mutate only ISetCookie2 implementations.

Please replace the remaining templates with the concrete Apache/AOSP behavior.

Refs #271
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@dalexsotodalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Six cookie-contract issues remain:

  • RFC2109 version parsing accepts negative integers; validation rejects them later.
  • Blank paths are replaced with /.
  • RFC2965 port parsing requires ISetCookie2 and a nonblank value.
  • Basic and RFC2109 domain handlers assign values unchanged rather than normalizing them.
  • BestMatchSpec.oneHeader affects only versioned cookies handled by RFC2965.
  • ContainsAttribute tests for a non-null mapped value, so present null-valued attributes can return false.

Please align these summaries and parameters with the Apache/AOSP implementations.

@jonathanpeppers

Copy link
Copy Markdown
MemberAuthor

@dalexsoto review

1 similar comment
@jonathanpeppers

Copy link
Copy Markdown
MemberAuthor

@dalexsoto review

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add XML documentation for Org.Apache.Http.Impl.Cookie

3 participants

@jonathanpeppers@dalexsoto