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