You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/22 13:33:38 UTC

[GitHub] [dubbo-go-pixiu] dk-lockdown opened a new issue #252: should clear HttpContext's filters when reset

dk-lockdown opened a new issue #252:
URL: https://github.com/apache/dubbo-go-pixiu/issues/252


   <!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!
   
   -->
   see [manager.go](https://github.com/apache/dubbo-go-pixiu/blob/develop/pkg/common/http/manager.go)
   
   ```
   // ServeHTTP http request entrance.
   func (s *DefaultHttpWorker) ServeHTTP(w http.ResponseWriter, r *http.Request) {
   	hc := s.pool.Get().(*h.HttpContext)
   	defer s.pool.Put(hc)
   
   	hc.Request = r
   	hc.ResetWritermen(w)
   	hc.Reset()
   
   	// now only one filter http_connection_manager, so just get it and call
   	err := s.ls.nf.OnData(hc)
   
   	if err != nil {
   		s.pool.Put(hc)
   		logger.Errorf("ServeHTTP %s", err)
   	}
   }
   ```
   
   ```
   func (hcm *HttpConnectionManager) OnData(hc *pch.HttpContext) error {
   	hc.Ctx = context.Background()
   	err := hcm.findRoute(hc)
   	if err != nil {
   		return err
   	}
   	hcm.addFilter(hc)
   	hcm.handleHTTPRequest(hc)
   	return nil
   }
   ```
   **What happened**:
   
   **What you expected to happen**:
   
   **How to reproduce it (as minimally and precisely as possible)**:
   
   **Anything else we need to know?**:
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] dk-lockdown closed issue #252: should clear HttpContext's filters when reset

Posted by GitBox <gi...@apache.org>.
dk-lockdown closed issue #252:
URL: https://github.com/apache/dubbo-go-pixiu/issues/252


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] dk-lockdown closed issue #252: should clear HttpContext's filters when reset

Posted by GitBox <gi...@apache.org>.
dk-lockdown closed issue #252:
URL: https://github.com/apache/dubbo-go-pixiu/issues/252


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org