Skip to content

Commit d384fdb

Browse files
authored
Clarify documentation for decoded_content (#166)
1 parent 874714c commit d384fdb

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/HTTP/Message.pm

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -898,9 +898,14 @@ for details about how charset is determined.
898898
899899
=item $mess->decoded_content( %options )
900900
901-
Returns the content with any C<Content-Encoding> undone and for textual content
902-
the raw content encoded to Perl's Unicode strings. If the C<Content-Encoding>
903-
or C<charset> of the message is unknown this method will fail by returning
901+
Returns the content with any C<Content-Encoding> undone and, for textual content
902+
(C<Content-Type> values starting with C<text/>, exactly matching
903+
C<application/xml>, or ending with C<+xml>), the raw content's character set
904+
decoded into Perl's Unicode string format. Note that this
905+
L<does not currently|https://github.com/libwww-perl/HTTP-Message/pull/99>
906+
attempt to decode declared character sets for any other content types like
907+
C<application/json> or C<application/javascript>. If the C<Content-Encoding>
908+
or C<charset> of the message is unknown, this method will fail by returning
904909
C<undef>.
905910
906911
The following options can be specified.

0 commit comments

Comments
 (0)