Skip to content

Commit

Permalink
Made more corrections to Cookie.ToString.
Browse files Browse the repository at this point in the history
1. Made Cookie Name and Value properties case insensitive
2. Throws exception on illegal Cookie Name
3. Doesn't emit "false" flag values
4. Properly escape key-value attributes.
  • Loading branch information
John J. Aylward committed May 26, 2020
1 parent 9c08482 commit 455787a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/json/Cookie.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static JSONObject toJSONObject(String string) throws JSONException {
* All other members are ignored.
* @param jo A JSONObject
* @return A cookie specification string
* @throws JSONException if a called function fails
* @throws JSONException thrown if the cookie has no name.
*/
public static String toString(JSONObject jo) throws JSONException {
StringBuilder sb = new StringBuilder();
Expand Down

0 comments on commit 455787a

Please sign in to comment.