.\" Man page generated from reStructuredText. . .TH "TSURLSTRINGGET" "3ts" "Mar 08, 2019" "7.1" "Apache Traffic Server" .SH NAME TSUrlStringGet \- traffic Server URL string representations API . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fI#include \fP .INDENT 0.0 .TP .B char * TSUrlStringGet(TSMBuffer\fI\ bufp\fP, TSMLoc\fI\ offset\fP, int *\fI\ length\fP) .UNINDENT .INDENT 0.0 .TP .B char * TSHttpTxnEffectiveUrlStringGet(TSHttpTxn\fI\ txn\fP, int *\fI\ length\fP) .UNINDENT .INDENT 0.0 .TP .B int TSUrlLengthGet(TSMBuffer\fI\ bufp\fP, TSMLoc\fI\ offset\fP) .UNINDENT .INDENT 0.0 .TP .B void TSUrlPrint(TSMBuffer\fI\ bufp\fP, TSMLoc\fI\ offset\fP, TSIOBuffer\fI\ iobufp\fP) .UNINDENT .SH DESCRIPTION .sp The URL data structure is a parsed version of a standard internet URL. The Traffic Server URL API provides access to URL data stored in marshal buffers. The URL functions can create, copy, retrieve or delete entire URLs, and retrieve or modify parts of URLs, such as their host, port or scheme information. .sp \fI\%TSUrlStringGet()\fP constructs a string representation of the URL located at \fIoffset\fP within the marshal buffer \fIbufp\fP\&. \fI\%TSUrlStringGet()\fP stores the length of the allocated string in the parameter \fIlength\fP\&. This is the same length that \fI\%TSUrlLengthGet()\fP returns. The returned string is allocated by a call to \fBTSmalloc()\fP and must be freed by a call to \fBTSfree()\fP\&. If length is \fBNULL\fP then no attempt is made to de\-reference it. .sp \fI\%TSHttpTxnEffectiveUrlStringGet()\fP is similar to \fI\%TSUrlStringGet()\fP\&. The two differences are .INDENT 0.0 .IP \(bu 2 The source is transaction \fItxn\fP in order to have access to the full request. .IP \(bu 2 It combines, if needed, both the explicit url and the \fBHost\fP field. This is done if the explicit URL does not have a host and the \fBHost\fP field does. .UNINDENT .sp This function is useful to guarantee a URL that is as complete as possible given the specific request. .sp \fI\%TSUrlLengthGet()\fP calculates the length of the URL located at \fIoffset\fP within the marshal buffer bufp as if it were returned as a string. This length will be the same as the length returned by \fI\%TSUrlStringGet()\fP\&. .sp \fI\%TSUrlPrint()\fP formats a URL stored in an \fBTSMBuffer\fP to an \fBTSIOBuffer\fP\&. .SH SEE ALSO .sp \fBTSAPI(3ts)\fP, \fBTSmalloc(3ts)\fP, \fBTSUrlCreate(3ts)\fP, \fBTSUrlHostGet(3ts)\fP, \fBTSUrlHostSet(3ts)\fP, \fBTSUrlPercentEncode(3ts)\fP .SH COPYRIGHT 2019, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .