Skip to content

mysql_remap + logging - "cquuc" cannot return unmapped url #4697

Closed

Description

@chuyenim

When I use mysql_remap for remapping, "cquuc" return origin url instead of unmapped url.

Activity

  1. mlibbey commented on Dec 13, 2018

    @mlibbey
    Contributor

    Think this a duplicate of #4684

  2. mlibbey commented on Dec 13, 2018

    @mlibbey
    Contributor

    Oh. Sorry -- are you sure you mean cquuc? We use that, and it logs the inbound/alias url. But, we don't use the mysql_remap plugin.

  3. chuyenim commented on Dec 14, 2018

    @chuyenim
    Author

    @mlibbey: Yes I mean cquuc - client_req_unmapped_url_canonical

  4. chuyenim commented on Dec 14, 2018

    @chuyenim
    Author

    I found this:

    int
    LogAccess::marshal_client_req_unmapped_url_canon(char *buf)
    {
      int len = INK_MIN_ALIGN;
    
      validate_unmapped_url();
      if (m_client_req_unmapped_url_canon_str == INVALID_STR) {
        // If the unmapped URL isn't populated, we'll fall back to the original
        // client URL. This helps for example server intercepts to continue to
        // log the requests, even when there is no remap rule for it.
        len = marshal_client_req_url_canon(buf);
      } else {
        len = round_strlen(m_client_req_unmapped_url_canon_len + 1); // +1 for eos
        if (buf) {
          marshal_mem(buf, m_client_req_unmapped_url_canon_str, m_client_req_unmapped_url_canon_len, len);
        }
      }
    
      return len;
    }
    

    It said: "If the unmapped URL isn't populated, we'll fall back to the original client URL. This helps for example server intercepts to continue to log the requests, even when there is no remap rule for it."
    But I think unmapped URLs is more helpful than original client URLs. And I want to catch them.

  5. shinrich commented on Jun 29, 2021

    @shinrich
    Member

    I took a quick look at the old mysql_remap plugin. It was a global plugin that triggered on the read request hook (before the remap phase), and it would call functions that would have updated the client request storage before the remap phase (TSUrlHostSet, TSUrlSchemeSet, TSUrlPortSet).

    We should have a read-only version of the original client request information. I will go ahead and file a new issue to track that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions