freak82 opened a new issue, #11375:
URL: https://github.com/apache/trafficserver/issues/11375

   Hi there,
   
   The `url_len` argument of `Http2CommonSession::add_url_to_pushed_table` 
[function](https://github.com/apache/trafficserver/blob/d31a40fecb19f80ae8b7ddbb2ff0efecc57bf7f9/src/proxy/http2/Http2CommonSession.cc#L459)
 is not passed to the `emplace` call. 
   ```
   void
   Http2CommonSession::add_url_to_pushed_table(const char *url, int url_len)
   {
     // Delay std::unordered_set allocation until when it used
     if (_h2_pushed_urls == nullptr) {
       this->_h2_pushed_urls = new std::unordered_set<std::string>();
       this->_h2_pushed_urls->reserve(Http2::push_diary_size);
     }
   
     if (_h2_pushed_urls->size() < Http2::push_diary_size) {
       _h2_pushed_urls->emplace(url);
     }
   }
   ```
   This means that it'll always search for the '\0' terminator when emplacing 
the string in `_h2_pushed_urls`.
   After checking the usage of `add_url_to_pushed_table`, it seems to be that 
the `url_len` should also be forwarded to the `emplace`. 
   Is this correct observation or not?


-- 
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: issues-unsubscr...@trafficserver.apache.org.apache.org

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

Reply via email to