| 1 | package Net::WebSocket::X::BadHTTPMethod; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use Net::WebSocket::Constants (); | ||
| 7 | |||
| 8 | use parent qw( Net::WebSocket::X::Base ); | ||
| 9 | |||
| 10 | sub _new { | ||
| 11 | my ($class, $method) = @_; | ||
| 12 | |||
| 13 | my $str = "Received invalid HTTP request method: $method"; | ||
| 14 | |||
| 15 | $str .= " - must be " . Net::WebSocket::Constants::REQUIRED_HTTP_METHOD(); | ||
| 16 | |||
| 17 | return $class->SUPER::_new( | ||
| 18 | $str, | ||
| 19 | method => $method, | ||
| 20 | ); | ||
| 21 | } | ||
| 22 | |||
| 23 | 1; |