mirror of
				https://github.com/nadoo/glider.git
				synced 2025-11-04 15:52:38 +08:00 
			
		
		
		
	http: add header ending in http proxy client mode
This commit is contained in:
		
							parent
							
								
									339a27f81f
								
							
						
					
					
						commit
						a79cd87ae8
					
				
							
								
								
									
										2
									
								
								http.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								http.go
									
									
									
									
									
								
							@ -197,6 +197,8 @@ func (s *HTTP) Dial(network, addr string) (net.Conn, error) {
 | 
				
			|||||||
		rc.Write([]byte("Proxy-Authorization: Basic " + base64.StdEncoding.EncodeToString([]byte(auth)) + "\r\n"))
 | 
							rc.Write([]byte("Proxy-Authorization: Basic " + base64.StdEncoding.EncodeToString([]byte(auth)) + "\r\n"))
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						rc.Write([]byte("\r\n"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	var b [1024]byte
 | 
						var b [1024]byte
 | 
				
			||||||
	n, err := rc.Read(b[:])
 | 
						n, err := rc.Read(b[:])
 | 
				
			||||||
	if bytes.Contains(b[:n], []byte("200")) {
 | 
						if bytes.Contains(b[:n], []byte("200")) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user