From 466ecd892224983318a9dcde75a140f94a1d4e91453686ede5dc96d63badf9a6 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 13 Jul 2015 10:22:44 +0000 Subject: [PATCH] Accepting request 316363 from devel:languages:perl:autoupdate automatic update OBS-URL: https://build.opensuse.org/request/show/316363 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-HTTP-Message?expand=0&rev=8 --- HTTP-Message-6.06.tar.gz | 3 - HTTP-Message-6.08.tar.gz | 3 + cpanspec.yml | 23 +++ perl-HTTP-Message.changes | 33 ++++ perl-HTTP-Message.spec | 327 ++++++++++++++++++++++++++++++++++++-- 5 files changed, 371 insertions(+), 18 deletions(-) delete mode 100644 HTTP-Message-6.06.tar.gz create mode 100644 HTTP-Message-6.08.tar.gz create mode 100644 cpanspec.yml diff --git a/HTTP-Message-6.06.tar.gz b/HTTP-Message-6.06.tar.gz deleted file mode 100644 index 04e4f87..0000000 --- a/HTTP-Message-6.06.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:087e97009c5239dca4631cf433d836771b3fc5ba5685eef1965f9d3415cbad63 -size 50806 diff --git a/HTTP-Message-6.08.tar.gz b/HTTP-Message-6.08.tar.gz new file mode 100644 index 0000000..b30fd1f --- /dev/null +++ b/HTTP-Message-6.08.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e45b3013e2099a56b50f28bd880cafadfbc603025c0ebde761898bac3f14324 +size 59554 diff --git a/cpanspec.yml b/cpanspec.yml new file mode 100644 index 0000000..9b7ec50 --- /dev/null +++ b/cpanspec.yml @@ -0,0 +1,23 @@ +--- +#description_paragraphs: 3 +#no_testing: broken upstream +#sources: +# - source1 +# - source2 +#patches: +# foo.patch: -p1 +# bar.patch: +#preamble: |- +# BuildRequires: gcc-c++ +#post_prep: |- +# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'` +# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL +#post_install: |- +# sed on %{name}.files +#license: SUSE-NonFree +#skip_noarch: 1 +#custom_build: |- +#./Build build flags=%{?_smp_mflags} --myflag +#custom_test: |- +#startserver && make test +#ignore_requires: Bizarre::Module diff --git a/perl-HTTP-Message.changes b/perl-HTTP-Message.changes index b81fe1e..2414827 100644 --- a/perl-HTTP-Message.changes +++ b/perl-HTTP-Message.changes @@ -1,3 +1,36 @@ +------------------------------------------------------------------- +Mon Jul 13 08:40:20 UTC 2015 - coolo@suse.com + +- updated to 6.08 + see /usr/share/doc/packages/perl-HTTP-Message/Changes + + Revision history for HTTP-Message + + 6.08 2015-07-10 + - Resolve new uninitialized warning from + HTTP::Request::Common::request_type_with_data (RT#105787) + + + 6.07 2015-07-09 + + - Allow subclasses to override the class of parts - it used to be + hardcoded to HTTP::Message. (Gisle Aas, RT#79239) + + - Added support for is_client_error, is_server_error to HTTP::Response + (Karen Etheridge) + + - Added flatten interface to HTTP::Headers (Tokuhiro Matsuno, GH#5) + + - Allow PUT to pass content data via hashrefs just like with POST (Michael + Schilli, GH#9) + + - Fix for "Content-Encoding: none" header (Gisle Aas, RT#94882) + + - Add support for HTTP status 308, defined in RFC 7238 (Olivier Mengué, + RT#104102) + + - drop the use of "use vars" (Karen Etheridge) + ------------------------------------------------------------------- Mon Aug 5 09:02:46 UTC 2013 - coolo@suse.com diff --git a/perl-HTTP-Message.spec b/perl-HTTP-Message.spec index 2d5e1ad..59d96a6 100644 --- a/perl-HTTP-Message.spec +++ b/perl-HTTP-Message.spec @@ -1,7 +1,7 @@ # # spec file for package perl-HTTP-Message # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,14 +17,15 @@ Name: perl-HTTP-Message -Version: 6.06 +Version: 6.08 Release: 0 %define cpan_name HTTP-Message Summary: HTTP style message (base class) License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/HTTP-Message/ -Source: http://www.cpan.org/authors/id/G/GA/GAAS/%{cpan_name}-%{version}.tar.gz +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/%{cpan_name}-%{version}.tar.gz +Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl @@ -43,16 +44,6 @@ BuildRequires: perl(IO::Uncompress::Inflate) BuildRequires: perl(IO::Uncompress::RawInflate) BuildRequires: perl(LWP::MediaTypes) >= 6 BuildRequires: perl(URI) >= 1.10 -#BuildRequires: perl(HTTP::Config) -#BuildRequires: perl(HTTP::Headers) -#BuildRequires: perl(HTTP::Headers::Auth) -#BuildRequires: perl(HTTP::Headers::ETag) -#BuildRequires: perl(HTTP::Headers::Util) -#BuildRequires: perl(HTTP::Message) -#BuildRequires: perl(HTTP::Request) -#BuildRequires: perl(HTTP::Request::Common) -#BuildRequires: perl(HTTP::Response) -#BuildRequires: perl(HTTP::Status) Requires: perl(Compress::Raw::Zlib) Requires: perl(Encode) >= 2.21 Requires: perl(Encode::Locale) >= 1 @@ -70,7 +61,313 @@ Requires: perl(URI) >= 1.10 %{perl_requires} %description -An 'HTTP::Message' object contains some headers and a content body. +An 'HTTP::Message' object contains some headers and a content body. The +following methods are available: + +* $mess = HTTP::Message->new + +* $mess = HTTP::Message->new( $headers ) + +* $mess = HTTP::Message->new( $headers, $content ) + + This constructs a new message object. Normally you would want construct + 'HTTP::Request' or 'HTTP::Response' objects instead. + + The optional $header argument should be a reference to an 'HTTP::Headers' + object or a plain array reference of key/value pairs. If an + 'HTTP::Headers' object is provided then a copy of it will be embedded + into the constructed message, i.e. it will not be owned and can be + modified afterwards without affecting the message. + + The optional $content argument should be a string of bytes. + +* $mess = HTTP::Message->parse( $str ) + + This constructs a new message object by parsing the given string. + +* $mess->headers + + Returns the embedded 'HTTP::Headers' object. + +* $mess->headers_as_string + +* $mess->headers_as_string( $eol ) + + Call the as_string() method for the headers in the message. This will be + the same as + + $mess->headers->as_string + + but it will make your program a whole character shorter :-) + +* $mess->content + +* $mess->content( $bytes ) + + The content() method sets the raw content if an argument is given. If no + argument is given the content is not touched. In either case the original + raw content is returned. + + Note that the content should be a string of bytes. Strings in perl can + contain characters outside the range of a byte. The 'Encode' module can + be used to turn such strings into a string of bytes. + +* $mess->add_content( $bytes ) + + The add_content() methods appends more data bytes to the end of the + current content buffer. + +* $mess->add_content_utf8( $string ) + + The add_content_utf8() method appends the UTF-8 bytes representing the + string to the end of the current content buffer. + +* $mess->content_ref + +* $mess->content_ref( \$bytes ) + + The content_ref() method will return a reference to content buffer + string. It can be more efficient to access the content this way if the + content is huge, and it can even be used for direct manipulation of the + content, for instance: + + ${$res->content_ref} =~ s/\bfoo\b/bar/g; + + This example would modify the content buffer in-place. + + If an argument is passed it will setup the content to reference some + external source. The content() and add_content() methods will + automatically dereference scalar references passed this way. For other + references content() will return the reference itself and add_content() + will refuse to do anything. + +* $mess->content_charset + + This returns the charset used by the content in the message. The charset + is either found as the charset attribute of the 'Content-Type' header or + by guessing. + + See the http://www.w3.org/TR/REC-html40/charset.html#spec-char-encoding + manpage for details about how charset is determined. + +* $mess->decoded_content( %options ) + + Returns the content with any 'Content-Encoding' undone and for textual + content the raw content encoded to Perl's Unicode strings. If the + 'Content-Encoding' or 'charset' of the message is unknown this method + will fail by returning 'undef'. + + The following options can be specified. + + * 'charset' + + This override the charset parameter for text content. The value 'none' + can used to suppress decoding of the charset. + + * 'default_charset' + + This override the default charset guessed by content_charset() or if + that fails "ISO-8859-1". + + * 'alt_charset' + + If decoding fails because the charset specified in the Content-Type + header isn't recognized by Perl's Encode module, then try decoding + using this charset instead of failing. The 'alt_charset' might be + specified as 'none' to simply return the string without any decoding of + charset as alternative. + + * 'charset_strict' + + Abort decoding if malformed characters is found in the content. By + default you get the substitution character ("\x{FFFD}") in place of + malformed characters. + + * 'raise_error' + + If TRUE then raise an exception if not able to decode content. Reason + might be that the specified 'Content-Encoding' or 'charset' is not + supported. If this option is FALSE, then decoded_content() will return + 'undef' on errors, but will still set $@. + + * 'ref' + + If TRUE then a reference to decoded content is returned. This might be + more efficient in cases where the decoded content is identical to the + raw content as no data copying is required in this case. + +* $mess->decodable + +* HTTP::Message::decodable() + + This returns the encoding identifiers that decoded_content() can process. + In scalar context returns a comma separated string of identifiers. + + This value is suitable for initializing the 'Accept-Encoding' request + header field. + +* $mess->decode + + This method tries to replace the content of the message with the decoded + version and removes the 'Content-Encoding' header. Returns TRUE if + successful and FALSE if not. + + If the message does not have a 'Content-Encoding' header this method does + nothing and returns TRUE. + + Note that the content of the message is still bytes after this method has + been called and you still need to call decoded_content() if you want to + process its content as a string. + +* $mess->encode( $encoding, ... ) + + Apply the given encodings to the content of the message. Returns TRUE if + successful. The "identity" (non-)encoding is always supported; other + currently supported encodings, subject to availability of required + additional modules, are "gzip", "deflate", "x-bzip2" and "base64". + + A successful call to this function will set the 'Content-Encoding' + header. + + Note that 'multipart/*' or 'message/*' messages can't be encoded and this + method will croak if you try. + +* $mess->parts + +* $mess->parts( @parts ) + +* $mess->parts( \@parts ) + + Messages can be composite, i.e. contain other messages. The composite + messages have a content type of 'multipart/*' or 'message/*'. This method + give access to the contained messages. + + The argumentless form will return a list of 'HTTP::Message' objects. If + the content type of $msg is not 'multipart/*' or 'message/*' then this + will return the empty list. In scalar context only the first object is + returned. The returned message parts should be regarded as read-only + (future versions of this library might make it possible to modify the + parent by modifying the parts). + + If the content type of $msg is 'message/*' then there will only be one + part returned. + + If the content type is 'message/http', then the return value will be + either an 'HTTP::Request' or an 'HTTP::Response' object. + + If a @parts argument is given, then the content of the message will be + modified. The array reference form is provided so that an empty list can + be provided. The @parts array should contain 'HTTP::Message' objects. The + @parts objects are owned by $mess after this call and should not be + modified or made part of other messages. + + When updating the message with this method and the old content type of + $mess is not 'multipart/*' or 'message/*', then the content type is set + to 'multipart/mixed' and all other content headers are cleared. + + This method will croak if the content type is 'message/*' and more than + one part is provided. + +* $mess->add_part( $part ) + + This will add a part to a message. The $part argument should be another + 'HTTP::Message' object. If the previous content type of $mess is not + 'multipart/*' then the old content (together with all content headers) + will be made part #1 and the content type made 'multipart/mixed' before + the new part is added. The $part object is owned by $mess after this call + and should not be modified or made part of other messages. + + There is no return value. + +* $mess->clear + + Will clear the headers and set the content to the empty string. There is + no return value + +* $mess->protocol + +* $mess->protocol( $proto ) + + Sets the HTTP protocol used for the message. The protocol() is a string + like 'HTTP/1.0' or 'HTTP/1.1'. + +* $mess->clone + + Returns a copy of the message object. + +* $mess->as_string + +* $mess->as_string( $eol ) + + Returns the message formatted as a single string. + + The optional $eol parameter specifies the line ending sequence to use. + The default is "\n". If no $eol is given then as_string will ensure that + the returned string is newline terminated (even when the message content + is not). No extra newline is appended if an explicit $eol is passed. + +* $mess->dump( %opt ) + + Returns the message formatted as a string. In void context print the + string. + + This differs from '$mess->as_string' in that it escapes the bytes of the + content so that it's safe to print them and it limits how much content to + print. The escapes syntax used is the same as for Perl's double quoted + strings. If there is no content the string "(no content)" is shown in its + place. + + Options to influence the output can be passed as key/value pairs. The + following options are recognized: + + * maxlength => $num + + How much of the content to show. The default is 512. Set this to 0 for + unlimited. + + If the content is longer then the string is chopped at the limit and + the string "...\n(### more bytes not shown)" appended. + + * no_content => $str + + Replaces the "(no content)" marker. + + * prefix => $str + + A string that will be prefixed to each line of the dump. + +All methods unknown to 'HTTP::Message' itself are delegated to the +'HTTP::Headers' object that is part of every message. This allows +convenient access to these methods. Refer to the HTTP::Headers manpage for +details of these methods: + + $mess->header( $field => $val ) + $mess->push_header( $field => $val ) + $mess->init_header( $field => $val ) + $mess->remove_header( $field ) + $mess->remove_content_headers + $mess->header_field_names + $mess->scan( \&doit ) + + $mess->date + $mess->expires + $mess->if_modified_since + $mess->if_unmodified_since + $mess->last_modified + $mess->content_type + $mess->content_encoding + $mess->content_length + $mess->content_language + $mess->title + $mess->user_agent + $mess->server + $mess->from + $mess->referer + $mess->www_authenticate + $mess->authorization + $mess->proxy_authorization + $mess->authorization_basic + $mess->proxy_authorization_basic %prep %setup -q -n %{cpan_name}-%{version} @@ -89,6 +386,6 @@ An 'HTTP::Message' object contains some headers and a content body. %files -f %{name}.files %defattr(-,root,root,755) -%doc Changes README +%doc Changes LICENSE README %changelog