"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "apache2/mod_parp.c" between
mod_parp-0.15-src.tar.gz and mod_parp-0.16-src.tar.gz

About: mod_parp is an Apache HTTP request parameter parser module that processes the request message body as well as the query portion of the request URL.

mod_parp.c  (mod_parp-0.15-src):mod_parp.c  (mod_parp-0.16-src)
skipping to change at line 32 skipping to change at line 32
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/************************************************************************ /************************************************************************
* Version * Version
***********************************************************************/ ***********************************************************************/
static const char revision[] = "$Id: mod_parp.c,v 1.44 2015/01/28 12:06:20 pbuch static const char revision[] = "$Id: mod_parp.c,v 1.46 2016/06/15 15:55:02 lukas
binder Exp $"; funk Exp $";
static const char g_revision[] = "0.15"; static const char g_revision[] = "0.16";
/************************************************************************ /************************************************************************
* Includes * Includes
***********************************************************************/ ***********************************************************************/
/* apache */ /* apache */
#include <httpd.h> #include <httpd.h>
#include <http_main.h> #include <http_main.h>
#include <http_request.h> #include <http_request.h>
#include <http_protocol.h> #include <http_protocol.h>
#include <http_config.h> #include <http_config.h>
skipping to change at line 760 skipping to change at line 760
if (!(ctd = apr_table_get(hs, "Content-Disposition"))) { if (!(ctd = apr_table_get(hs, "Content-Disposition"))) {
self->error = apr_pstrdup(self->pool, self->error = apr_pstrdup(self->pool,
"failed to read content disposition"); "failed to read content disposition");
return APR_EINVAL; return APR_EINVAL;
} }
if ((status = parp_read_header(self, ctd, &ctds)) != APR_SUCCESS) { if ((status = parp_read_header(self, ctd, &ctds)) != APR_SUCCESS) {
return status; return status;
} }
/* if no content type is set the b->data is the parameters value /* skip all parts with top-level content-type "multipart" */
* no content type implies text/plain - this is the only type we can edit */ char *tlct = apr_pstrndup(self->pool, ct, sizeof "multipart" - 1);
if (!ct || ((apr_strnatcasecmp(ct, "text/plain") == 0) && ctd)) { if (!ct || apr_strnatcasecmp(tlct, "multipart")) {
char *val = b->data; char *val = b->data;
if ((key = apr_table_get(ctds, "name")) == NULL) { if ((key = apr_table_get(ctds, "name")) == NULL) {
return APR_EINVAL; return APR_EINVAL;
} }
val_len = b->len; val_len = b->len;
/* there must be a \r\n or at least a \n */ /* there must be a \r\n or at least a \n */
if (val_len >= 2 && strncmp(&val[val_len - 2], "\r\n", 2) == 0) { if (val_len >= 2 && strncmp(&val[val_len - 2], "\r\n", 2) == 0) {
if (self->rw_params) { if (self->rw_params) {
/* don't modify the raw data since we still need them */ /* don't modify the raw data since we still need them */
val = apr_pstrndup(self->pool, val, val_len - 2); val = apr_pstrndup(self->pool, val, val_len - 2);
 End of changes. 2 change blocks. 
6 lines changed or deleted 6 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS