response: Add tests for maximum-length META
This commit is contained in:
		
							parent
							
								
									f156be19b4
								
							
						
					
					
						commit
						6a1ccdc644
					
				@ -38,6 +38,15 @@ func TestReadWriteResponse(t *testing.T) {
 | 
			
		||||
			Meta:      "/redirect",
 | 
			
		||||
			SkipWrite: true, // skip write test since result won't match Raw
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			Raw:    "32 " + maxURL + "\r\n",
 | 
			
		||||
			Status: 32,
 | 
			
		||||
			Meta:   maxURL,
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			Raw: "33 " + maxURL + "xxxx" + "\r\n",
 | 
			
		||||
			Err: ErrInvalidResponse,
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			Raw:    "99 Unknown status code\r\n",
 | 
			
		||||
			Status: 99,
 | 
			
		||||
@ -87,7 +96,7 @@ func TestReadWriteResponse(t *testing.T) {
 | 
			
		||||
		if err != test.Err {
 | 
			
		||||
			t.Errorf("expected err = %v, got %v", test.Err, err)
 | 
			
		||||
		}
 | 
			
		||||
		if test.Err != nil {
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			// No response
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user