Skip to content

Commit a908bb4

Browse files
cost0muchshipilev
authored andcommitted
8320577: Improve MessageHeader's toString() function to make HttpURLConnection's debug log readable
Backport-of: aac43184319d852eb792c83dfb52d74a3126108d
1 parent 89bd3fc commit a908bb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/java.base/share/classes/sun/net/www/MessageHeader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -609,7 +609,7 @@ public void mergeHeader(InputStream is) throws java.io.IOException {
609609
}
610610

611611
public synchronized String toString() {
612-
String result = super.toString() + nkeys + " pairs: ";
612+
String result = super.toString() + " " + nkeys + " pairs: ";
613613
for (int i = 0; i < keys.length && i < nkeys; i++) {
614614
result += "{"+keys[i]+": "+values[i]+"}";
615615
}

0 commit comments

Comments
 (0)