[jira] [Created] (TS-1070) replace and deprecate TSFetchURL()
replace and deprecate TSFetchURL() -- Key: TS-1070 URL: https://issues.apache.org/jira/browse/TS-1070 Project: Traffic Server Issue Type: Improvement Components: TS API Reporter: James Peach Priority: Minor TSFetchURL() has a number of shortcomings: 1. it's not cancellable 2. the event delivery is bizarre 3. it doesn't play nicely with the TSHttpHdr*() API. I propose the following API changes: typedef enum { ... TS_EVENT_FETCH_SUCCESS, TS_EVENT_FETCH_FAILURE } TSEvent; TSAction TSFetchResource(TSCont, TSMBuffer, TSLoc, const sockaddr *, TSFetchWakeUpOptions); TSFetchResource() takes a TSMBuffer/TSLoc pair that must contain the HTTP and MIME headers. If the HTTP method in the HTTP header is not GET, and a error will be reported. The continuation callback will be invoked with either TS_EVENT_FETCH_SUCCESS or TS_EVENT_FETCH_SUCCESS. For TS_EVENT_FETCH_SUCCESS, the edata pointer will be a HttpTxn pointer suitable for call TSFetchRespGet() or TSFetchHdrGet(). For TS_EVENT_FETCH_FAILURE, I'd like to arrange a way to get the HTTP error code. Hopefully there is some existing precedent to follow. TSFetchResource() should be cancellable via the TSAction return value. I'm not sure whether TSFetchWakeUpOptions is really necessary, but if we eliminate this, I'd argue for a uint64_t flags parameter. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TS-1045) PATCH: add new TSFetchHdrGet API
[ https://issues.apache.org/jira/browse/TS-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Peach updated TS-1045: Attachment: 0001-Add-new-public-API-TSFetchHdrGet.patch Updated TSFetchHdrGet() patch that adds the error checking from TSFetchPageRespGet(). It also deprecates FSFetchPageRespGet(). > PATCH: add new TSFetchHdrGet API > > > Key: TS-1045 > URL: https://issues.apache.org/jira/browse/TS-1045 > Project: Traffic Server > Issue Type: Improvement > Components: HTTP >Reporter: James Peach >Assignee: Leif Hedstrom >Priority: Minor > Fix For: 3.1.2 > > Attachments: 0001-Add-new-public-API-TSFetchHdrGet.patch, > 0007-Add-new-public-API-TSFetchHdrGet.patch, TS-1045-formatting.diff > > > TSFetchUrl does not provide any way to get the headers from the result. This > patch adds a new API TSFetchHdrGet(), which is analogous to TSFetchRespGet() > and returns the headers. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TS-1045) PATCH: add new TSFetchHdrGet API
[ https://issues.apache.org/jira/browse/TS-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178266#comment-13178266 ] James Peach commented on TS-1045: - TSFetchPageRespGet() takes a HTTPHdr * and returns a TSMBuffer and TSMLoc that you can use with the TSHttpHdr*() API. However, there is no way to get the HTTPHdr * in the first place. The TSFetch API passes the FetchSM * (cast to a HttpTxn) to the plugin callback. AFAICT there's no way to actually use TSFetchPageRespGet(); even if you could use it, it looks like it returns the HTTPHdr data, since the implementation is almost identical to the proposed TSFetchHdrGet(). Googling for TSFetchPageRespGet only turns up this page, so I expect that no-one has ever attempted to use it ;) > PATCH: add new TSFetchHdrGet API > > > Key: TS-1045 > URL: https://issues.apache.org/jira/browse/TS-1045 > Project: Traffic Server > Issue Type: Improvement > Components: HTTP >Reporter: James Peach >Assignee: Leif Hedstrom >Priority: Minor > Fix For: 3.1.2 > > Attachments: 0007-Add-new-public-API-TSFetchHdrGet.patch, > TS-1045-formatting.diff > > > TSFetchUrl does not provide any way to get the headers from the result. This > patch adds a new API TSFetchHdrGet(), which is analogous to TSFetchRespGet() > and returns the headers. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TS-993) Add OpenBSD support.
[ https://issues.apache.org/jira/browse/TS-993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178252#comment-13178252 ] Piotr Sikora commented on TS-993: - Uhm, like the original comment says, this one patch only lets ATS compile on OpenBSD. Know issues (so far): 1) it goes straight away to 100% CPU doing gettimeofday() thousands of time per second. 2) it crashes after first request when compiled without --enable-debug. 3) it crashes right away when compiled with --enable-debug: {code} FATAL: ../../lib/ts/ink_thread.h:267: failed assert `pthread_cond_wait(cp, mp) == 0` {code} 4) it fails to regiester kqueue events: {code} ERROR: [iocore_dns] open_con: Failed to add 257175888 server to epoll list {code} Those might be partly my fault, because I'm compiling it with: {code} CXXFLAGS="-DRENTRENT_GETHOSTBYNAME -DRENTRENT_GETHOSTBYADDR" {code} even though I know this isn't true, but OpenBSD doesn't have thread-safe gethostby{name,addr}() implementation... Ideally, we should use getaddrinfo() here. All in all, I'm not too happy about the "Resolved / Fixed" status update. Oh, and this patch got committed with wrong ticket number (TS-992 instead of TS-993). > Add OpenBSD support. > > > Key: TS-993 > URL: https://issues.apache.org/jira/browse/TS-993 > Project: Traffic Server > Issue Type: Improvement > Environment: OpenBSD >Reporter: Piotr Sikora >Assignee: Leif Hedstrom > Fix For: 3.1.2 > > Attachments: 0001-Add-OpenBSD-support.patch > > > Add OpenBSD support. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TS-992) Generic portability fixes.
[ https://issues.apache.org/jira/browse/TS-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178251#comment-13178251 ] Piotr Sikora commented on TS-992: - Hey Leif, it looks that the changes you've made to patch 0011 in [#121|http://svn.apache.org/viewvc?view=rev&rev=121], that is, adding: {code} const_cast {code} instead of: {code} (const time_t *) {code} don't really work and build fails with: {code} SysAPI.cc: In function 'int Time_GetTime(char*, size_t, char*, size_t, char*, size_t)': SysAPI.cc:651: error: invalid const_cast from type 'long int*' to type 'const time_t*' SysAPI.cc: In function 'int Time_GetDate(char*, size_t, char*, size_t, char*, size_t)': SysAPI.cc:691: error: invalid const_cast from type 'long int*' to type 'time_t*' ConfigCmd.cc: In function 'int ConfigDate(char*)': ConfigCmd.cc:2645: error: invalid const_cast from type 'long int*' to type 'const time_t*' ConfigCmd.cc: In function 'int ConfigTime(char*)': ConfigCmd.cc:2729: error: invalid const_cast from type 'long int*' to type 'const time_t*' {code} > Generic portability fixes. > -- > > Key: TS-992 > URL: https://issues.apache.org/jira/browse/TS-992 > Project: Traffic Server > Issue Type: Improvement > Environment: OpenBSD >Reporter: Piotr Sikora >Assignee: Leif Hedstrom >Priority: Minor > Fix For: 3.1.2 > > Attachments: 0001-iocore-s-swap-ts_swap-g.patch, > 0001-iocore-s-swap-ts_swap-g.patch, > 0002-iocore-don-t-mix-old-and-new-arpa-nameser.h-interfac.patch, > 0003-mgmt-drop-getnetparms-it-isn-t-used-anywhere.patch, > 0004-iocore-fix-incorrect-HostDBProcessor-getby-call.patch, > 0005-tests-add-missing-link-time-flags.patch, > 0006-proxy-NULL-is-defined-in-unistd.h.patch, > 0007-iocore-guard-against-missing-ENOSR-and-EPROTO-defini.patch, > 0008-proxy-fix-usage-of-NEED_ALTZONE_DEFINED.patch, > 0009-proxy-fix-off-by-one-error-in-sscanf.patch, > 0010-autoconf-improve-detection-of-available-system-heade.patch, > 0011-mgmt-cast-localtime-argument-to-const-time_t.patch, > 0012-examples-add-missing-sys-types.h-header.patch > > > Bunch of patches. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira