mirror of
				https://github.com/nadoo/glider.git
				synced 2025-11-04 07:42:38 +08:00 
			
		
		
		
	http: Proxy-Authorization header
This commit is contained in:
		
							parent
							
								
									4ac0847ea9
								
							
						
					
					
						commit
						339a27f81f
					
				
							
								
								
									
										2
									
								
								http.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								http.go
									
									
									
									
									
								
							@ -194,7 +194,7 @@ func (s *HTTP) Dial(network, addr string) (net.Conn, error) {
 | 
			
		||||
 | 
			
		||||
	if s.user != "" && s.password != "" {
 | 
			
		||||
		auth := s.user + ":" + s.password
 | 
			
		||||
		rc.Write([]byte("Authorization: Basic " + base64.StdEncoding.EncodeToString([]byte(auth)) + "\r\n"))
 | 
			
		||||
		rc.Write([]byte("Proxy-Authorization: Basic " + base64.StdEncoding.EncodeToString([]byte(auth)) + "\r\n"))
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var b [1024]byte
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user