| 861 | } |
| 862 | |
| 863 | static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid *cid, |
| 864 | apr_uint32_t HSE_code, |
| 865 | void *buf_ptr, |
| 866 | apr_uint32_t *buf_size, |
| 867 | apr_uint32_t *data_type) |
| 868 | { |
| 869 | request_rec *r = cid->r; |
| 870 | conn_rec *c = r->connection; |
| 871 | char *buf_data = (char*)buf_ptr; |
| 872 | request_rec *subreq; |
| 873 | apr_status_t rv; |
| 874 | |
| 875 | switch (HSE_code) { |
| 876 | case HSE_REQ_SEND_URL_REDIRECT_RESP: |
| 877 | /* Set the status to be returned when the HttpExtensionProc() |
| 878 | * is done. |
| 879 | * WARNING: Microsoft now advertises HSE_REQ_SEND_URL_REDIRECT_RESP |
| 880 | * and HSE_REQ_SEND_URL as equivalent per the Jan 2000 SDK. |
| 881 | * They most definitely are not, even in their own samples. |
| 882 | */ |
| 883 | apr_table_set (r->headers_out, "Location", buf_data); |
| 884 | cid->r->status = cid->ecb->dwHttpStatusCode = HTTP_MOVED_TEMPORARILY; |
| 885 | cid->r->status_line = ap_get_status_line(cid->r->status); |
| 886 | cid->headers_set = 1; |
| 887 | return 1; |
| 888 | |
| 889 | case HSE_REQ_SEND_URL: |
| 890 | /* Soak up remaining input */ |
| 891 | if (r->remaining > 0) { |
| 892 | char argsbuffer[HUGE_STRING_LEN]; |
| 893 | while (ap_get_client_block(r, argsbuffer, HUGE_STRING_LEN)); |
| 894 | } |
| 895 | |
| 896 | /* Reset the method to GET */ |
| 897 | r->method = "GET"; |
| 898 | r->method_number = M_GET; |
| 899 | |
| 900 | /* Don't let anyone think there's still data */ |
| 901 | apr_table_unset(r->headers_in, "Content-Length"); |
| 902 | |
| 903 | /* AV fault per PR3598 - redirected path is lost! */ |
| 904 | buf_data = apr_pstrdup(r->pool, (char*)buf_data); |
| 905 | ap_internal_redirect(buf_data, r); |
| 906 | return 1; |
| 907 | |
| 908 | case HSE_REQ_SEND_RESPONSE_HEADER: |
| 909 | { |
| 910 | /* Parse them out, or die trying */ |
| 911 | apr_size_t statlen = 0, headlen = 0; |
| 912 | apr_ssize_t ate; |
| 913 | if (buf_data) |
| 914 | statlen = strlen((char*) buf_data); |
| 915 | if (data_type) |
| 916 | headlen = strlen((char*) data_type); |
| 917 | ate = send_response_header(cid, (char*) buf_data, |
| 918 | (char*) data_type, |
| 919 | statlen, headlen); |
| 920 | if (ate < 0) { |
nothing calls this directly
no test coverage detected