| 75 | } |
| 76 | |
| 77 | bool |
| 78 | HttpHeader::setUrl(TSMBuffer const bufurl, TSMLoc const locurl) |
| 79 | { |
| 80 | if (!isValid()) { |
| 81 | return false; |
| 82 | } |
| 83 | |
| 84 | TSMLoc locurlout = nullptr; |
| 85 | TSReturnCode rcode = TSHttpHdrUrlGet(m_buffer, m_lochdr, &locurlout); |
| 86 | if (TS_SUCCESS != rcode) { |
| 87 | return false; |
| 88 | } |
| 89 | |
| 90 | // copy the url |
| 91 | rcode = TSUrlCopy(m_buffer, locurlout, bufurl, locurl); |
| 92 | |
| 93 | // set url active |
| 94 | if (TS_SUCCESS == rcode) { |
| 95 | rcode = TSHttpHdrUrlSet(m_buffer, m_lochdr, locurlout); |
| 96 | } |
| 97 | |
| 98 | TSHandleMLocRelease(m_buffer, m_lochdr, locurlout); |
| 99 | |
| 100 | return TS_SUCCESS == rcode; |
| 101 | } |
| 102 | |
| 103 | bool |
| 104 | HttpHeader::setReason(char const *const valstr, int const vallen) |
no test coverage detected