testRequestLineTooLong self withServerDo: [ :server | | url response | self deny: server debugMode. url := server localUrl addPathSegment: #echo; addPathSegment: (String new: ZnConstants maximumLineLength withAll: $X); yourself. response := ZnEasy get: url. self deny: response isSuccess. self assert: response code equals: 400. self assert: response contentType equals: ZnMimeType textPlain. self assert: (response entity contents includesSubstring: 'ZnLineTooLong') ] testTooManyHeaders self withServerDo: [ :server | | response client | self deny: server debugMode. client := ZnClient new url: server localUrl; addPathSegment: #echo; yourself. client request headers unlimited. 1 to: 256 do: [ :each | client headerAt: ('X-Test-', each printString) put: each printString ]. response := client get; response. client close. self deny: response isSuccess. self assert: response code equals: 400. self assert: response contentType equals: ZnMimeType textPlain. self assert: (response entity contents includesSubstring: 'ZnTooManyDictionaryEntries') ] testEntityTooLarge self withServerDo: [ :server | | response client | server maximumEntitySize: 1024. self deny: server debugMode. client := ZnClient new url: server localUrl; addPathSegment: #echo; entity: (ZnEntity with: (ByteArray new: 1024 + 1)); yourself. response := client post; response. client close. self deny: response isSuccess. self assert: response code equals: 400. self assert: response contentType equals: ZnMimeType textPlain. self assert: (response entity contents includesSubstring: 'ZnEntityTooLarge') ] testHeaderLineTooLong self withServerDo: [ :server | | response client | self deny: server debugMode. client := ZnClient new url: server localUrl; addPathSegment: #echo; headerAt: 'X-Test' put: (String new: ZnConstants maximumLineLength withAll: $X); yourself. response := client get; response. client close. self deny: response isSuccess. self assert: response code equals: 400. self assert: response contentType equals: ZnMimeType textPlain. self assert: (response entity contents includesSubstring: 'ZnLineTooLong') ]