[
https://issues.apache.org/jira/browse/TS-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13867666#comment-13867666
]
bettydramit commented on TS-2235:
---------------------------------
<code>
diff -Nur ts-4.1.2/proxy/hdrs/URL.cc ts-4.1.2.new/proxy/hdrs/URL.cc
--- ts-4.1.2/proxy/hdrs/URL.cc 2013-12-06 06:07:48.000000000 +0800
+++ ts-4.1.2.new/proxy/hdrs/URL.cc 2014-01-10 17:26:59.698025425 +0800
@@ -781,13 +781,13 @@
else
length += 1; // +1 for /
- if (url->m_ptr_params)
+ if (url->m_ptr_params && url->m_len_params > 0)
length += url->m_len_params + 1; // +1 for ";"
- if (url->m_ptr_query)
+ if (url->m_ptr_query && url->m_len_query > 0)
length += url->m_len_query + 1; // +1 for "?"
- if (url->m_ptr_fragment)
+ if (url->m_ptr_fragment && url->m_len_fragment > 0)
length += url->m_len_fragment + 1; // +1 for "/"
return length;
<code>
> url_print should NOT output "?" for empty query string
> -------------------------------------------------------
>
> Key: TS-2235
> URL: https://issues.apache.org/jira/browse/TS-2235
> Project: Traffic Server
> Issue Type: Bug
> Components: MIME
> Reporter: Yu Qing
> Assignee: Yu Qing
> Fix For: 4.1.2, 4.2.0
>
> Attachments: 0001-TS-2235-two-functions-should-be-changed-too.patch,
> 0001-TS-2235-url_print-should-NOT-output-for-empty-query-.patch
>
>
> the same problem with parameter and fragment parts.
> for example: a remap plugin removes the query part (set query to empty), but
> the remaped url end with "?".
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)