add http header option #142
@@ -73,6 +73,7 @@ func (h *httpServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ctx := context.WithValue(r.Context(), rspCodeKey{}, &rspCodeVal{})
 | 
						ctx := context.WithValue(r.Context(), rspCodeKey{}, &rspCodeVal{})
 | 
				
			||||||
 | 
						ctx = context.WithValue(ctx, rspHeaderKey{}, &rspHeaderVal{})
 | 
				
			||||||
	md, ok := metadata.FromIncomingContext(ctx)
 | 
						md, ok := metadata.FromIncomingContext(ctx)
 | 
				
			||||||
	if !ok {
 | 
						if !ok {
 | 
				
			||||||
		md = metadata.New(len(r.Header) + 8)
 | 
							md = metadata.New(len(r.Header) + 8)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user