check_chunked revision a2652f3451528565db1f85db6953fc30799d7ead
1186N/A# Copyright 2000-2006 The Apache Software Foundation or its licensors, as 0N/A# Licensed under the Apache License, Version 2.0 (the "License"); 1281N/A# you may not use this file except in compliance with the License. 0N/A# You may obtain a copy of the License at 0N/A# Unless required by applicable law or agreed to in writing, software 0N/A# distributed under the License is distributed on an "AS IS" BASIS, 0N/A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0N/A# See the License for the specific language governing permissions and 0N/A# limitations under the License. 0N/A# This is meant to be used on the raw output of an HTTP/1.1 connection 0N/A# to check that the chunks are all correctly laid out. It's easiest 1297N/A# to use a tool like netcat to generate the output. This script 0N/A# *insists* that \r exist in the output. 1186N/A $_ = <> || die "unexpected end of file!\n"; 1281N/A m#^([0-9a-f]+) *\r$#i || die "bogus chunklen: $_"; 1281N/A $_ = <> || die "unexpected end of file!\n";