You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tcl.apache.org by mx...@apache.org on 2020/02/03 21:49:30 UTC
[tcl-rivet] branch uploadcmdfix updated (91285e5 -> 2ede0c7)
This is an automated email from the ASF dual-hosted git repository.
mxmanghi pushed a change to branch uploadcmdfix
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git.
from 91285e5 reorganized upload command,adding copyright statements to files in src/request/
add 12b12ba New color scheme for Rivet 3.2 manual
add fa17079 Update README.md
add 9ad9447 Update STATUS
add 0ac4f42 Merge branch 'master' of https://gitbox.apache.org/repos/asf/tcl-rivet
add 3d239bd fixed bug in configuration record merging (upload_files_to_var wasn't handled)
new 469adc5 several updates to copyright statements and comments
new f267b41 several updates to copyright statements and comments
new 2ede0c7 merging changes from central repository
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
ChangeLog | 14 +++++++++
README.md | 9 +-----
STATUS | 33 +++++++-------------
doc/rivet.css | 67 ++++++++++++++++++++++++----------------
src/mod_rivet_ng/apache_config.c | 1 +
src/mod_rivet_ng/rivetCore.c | 27 +++++-----------
6 files changed, 76 insertions(+), 75 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tcl.apache.org
For additional commands, e-mail: commits-help@tcl.apache.org
[tcl-rivet] 03/03: merging changes from central repository
Posted by mx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mxmanghi pushed a commit to branch uploadcmdfix
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git
commit 2ede0c71268fe93a57084b5d9aef9ac5c4e349f9
Merge: f267b41 91285e5
Author: Massimo Manghi <mx...@apache.org>
AuthorDate: Mon Feb 3 22:49:10 2020 +0100
merging changes from central repository
ChangeLog | 12 ++++++++++++
src/mod_rivet_ng/TclWebapache.c | 32 ++++++++++++++------------------
src/mod_rivet_ng/mod_rivet.h | 2 +-
src/mod_rivet_ng/rivetCore.c | 18 ++++++++++--------
src/mod_rivet_ng/rivet_types.h | 6 +++---
src/request/apache_multipart_buffer.c | 30 ++++++++++++++++++------------
src/request/apache_multipart_buffer.h | 2 +-
src/request/apache_request.c | 5 ++---
8 files changed, 61 insertions(+), 46 deletions(-)
diff --cc ChangeLog
index 84bb7ab,c369491..e5b634b
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,15 -1,13 +1,27 @@@
+2020-02-03 Massimo Manghi <mx...@apache.org>
+ * src/request/: Update obsolete copyright statements
+ * src/mod_rivet_ng/rivetCore.c: update comments to upload command
+ * tests: changed upload file test
+
++2019-12-30 Massimo Manghi <mx...@apache.org>
++ * src/mod_rivet_ng/rivetCore.c: fixed bug in 'upload filename' that
++ caused segfaults instead of Tcl errors when called without arguments
++
+ 2019-12-30 Massimo Manghi <mx...@apache.org>
+ * src/mod_rivet_ng/rivetCore.c: fixed bug in 'upload filename' that
+ caused segfaults instead of Tcl errors when called without arguments
+ * src/request/: Adding latest Copyright statements to files in this
+ directory
+ * tests/upload.rvt,upload.test: revised upload tests (need expansion
+ to test multiple uploads)
+
+2019-12-12 Massimo Manghi <mx...@apache.org>
+ * src/mod_rivet_ng/apache_config.c: copying also upload_files_to_var in
+ Rivet_MergeConfig
+
2019-12-06 Massimo Manghi <mx...@apache.org>
* src/mod_rivet_ng/rivetCore.c: expanded error info data in Rivet_Upload
+ * doc/rivet.css: new color scheme for docbook manual
2019-12-04 Massimo Manghi <mx...@apache.org>
* src/mod_rivet_ng/rivetCore.c: new branch uploadcmdfix with improved
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tcl.apache.org
For additional commands, e-mail: commits-help@tcl.apache.org
[tcl-rivet] 01/03: several updates to copyright statements and
comments
Posted by mx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mxmanghi pushed a commit to branch uploadcmdfix
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git
commit 469adc563702845a2243c92dce3c9ca4620b03d0
Merge: 6028291 3d239bd
Author: Massimo Manghi <mx...@apache.org>
AuthorDate: Mon Feb 3 22:46:11 2020 +0100
several updates to copyright statements and comments
ChangeLog | 5 +++
README.md | 9 +-----
STATUS | 33 +++++++-------------
doc/rivet.css | 67 ++++++++++++++++++++++++----------------
src/mod_rivet_ng/apache_config.c | 1 +
src/mod_rivet_ng/rivetCore.c | 25 ++++-----------
6 files changed, 66 insertions(+), 74 deletions(-)
diff --cc ChangeLog
index 36212c6,154645d..f396d18
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,10 -1,10 +1,15 @@@
+ 2019-12-12 Massimo Manghi <mx...@apache.org>
+ * src/mod_rivet_ng/apache_config.c: copying also upload_files_to_var in
+ Rivet_MergeConfig
+
2019-12-06 Massimo Manghi <mx...@apache.org>
+ * src/mod_rivet_ng/rivetCore.c: expanded error info data in Rivet_Upload
+ * doc/rivet.css: new color scheme for docbook manual
+2019-12-04 Massimo Manghi <mx...@apache.org>
+ * src/mod_rivet_ng/rivetCore.c: new branch uploadcmdfix with improved
+ argument checking in Rivet_Upload that was the cause of random crashes
+
2019-11-29 Brice Hamon <bh...@apache.org>
* src/mod_rivet_ng/mod_rivet_cache.h: added RivetCache_DeleteEntry
* src/mod_rivet_ng/mod_rivet_cache.c:
diff --cc STATUS
index c7884b4,fc24cc1..bacea17
--- a/STATUS
+++ b/STATUS
@@@ -25,11 -15,12 +15,12 @@@ Work in progress
*) Installation
+ Min Required
Platform Tcl Version Ok?
-------- ----------- ---
- Debian testing/unstable Tcl 8.4 Yes
- Redhat 7.3 Tcl 8.4 Yes
- FreeBSD 4.8-STABLE Tcl 8.4 Yes
- FreeBSD 5.3 Tcl 8.4 Yes
-
- *) auto* tools work in progress.
+ Debian Tcl 8.6 Yes
+ Ubuntu Tcl 8.6 Yes
-CentOS Tcl 8.6 Yes
-Suse Tcl 8.6 Yes
++CentOS Tcl 8.6 Yes
++Suse Tcl 8.6 Yes
+ FreeBSD Tcl 8.6 Yes
+ Windows 10 Tcl 8.6 Yes
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tcl.apache.org
For additional commands, e-mail: commits-help@tcl.apache.org
[tcl-rivet] 02/03: several updates to copyright statements and
comments
Posted by mx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mxmanghi pushed a commit to branch uploadcmdfix
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git
commit f267b41a12aa98278d98a7979b643228bd2c9f05
Author: Massimo Manghi <mx...@apache.org>
AuthorDate: Mon Feb 3 22:47:19 2020 +0100
several updates to copyright statements and comments
---
ChangeLog | 5 +++++
src/mod_rivet_ng/mod_rivet.c | 2 +-
src/mod_rivet_ng/rivetCore.c | 31 ++++++++++++++-------------
src/mod_rivet_ng/rivet_types.h | 9 ++++----
src/request/apache_multipart_buffer.h | 40 +++++++++++++++++++----------------
src/request/apache_request.c | 32 ++++++++++++++++------------
src/request/apache_request.h | 33 +++++++++++++++++++++++------
tests/runtests.tcl | 2 --
tests/upload.rvt | 25 +++++++++++++++++++++-
tests/upload.test | 6 ++----
10 files changed, 119 insertions(+), 66 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f396d18..84bb7ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-02-03 Massimo Manghi <mx...@apache.org>
+ * src/request/: Update obsolete copyright statements
+ * src/mod_rivet_ng/rivetCore.c: update comments to upload command
+ * tests: changed upload file test
+
2019-12-12 Massimo Manghi <mx...@apache.org>
* src/mod_rivet_ng/apache_config.c: copying also upload_files_to_var in
Rivet_MergeConfig
diff --git a/src/mod_rivet_ng/mod_rivet.c b/src/mod_rivet_ng/mod_rivet.c
index d3dbc5c..91550eb 100644
--- a/src/mod_rivet_ng/mod_rivet.c
+++ b/src/mod_rivet_ng/mod_rivet.c
@@ -327,7 +327,7 @@ Rivet_ServerInit (apr_pool_t *pPool, apr_pool_t *pLog, apr_pool_t *pTemp, server
apr_pool_userdata_set((const void *)1, userdata_key,
apr_pool_cleanup_null, server->process->pool);
- ap_log_error(APLOG_MARK,APLOG_INFO,0,server,
+ ap_log_error(APLOG_MARK,APLOG_DEBUG,0,server,
"first post_config run: not initializing Tcl stuff");
return OK; /* This would be the first time through */
diff --git a/src/mod_rivet_ng/rivetCore.c b/src/mod_rivet_ng/rivetCore.c
index 80d62c4..34dfe4e 100644
--- a/src/mod_rivet_ng/rivetCore.c
+++ b/src/mod_rivet_ng/rivetCore.c
@@ -1048,18 +1048,19 @@ TCL_CMD_HEADER( Rivet_Upload )
* - subcommand integer progressive index
* - subcommand required (minimum) number of arguments
*
- *----+----------------------------------------+-------+
- * | argv[1] argv[2] argv[3] | argc |
- *----+----------------------------------------+-------+
- * | upload channel uploadname | 3 |
- * | upload save uploadname filename | 4 |
- * | upload data uploadname | 3 |
- * | upload exists uploadname | 3 |
- * | upload size uploadname | 3 |
- * | upload type | 2 |
- * | upload filename uploadname | 3 |
- * | upload tempname uploadname | 3 |
- * | upload names | 2 |
+ * +----------------------------------------+-------+
+ * | argv[1] argv[2] argv[3] | argc |
+ * +----------------------------------------+-------+
+ * | upload channel uploadname | 3 |
+ * | upload save uploadname filename | 4 |
+ * | upload data uploadname | 3 |
+ * | upload exists uploadname | 3 |
+ * | upload size uploadname | 3 |
+ * | upload type uploadname | 3 |
+ * | upload filename uploadname | 3 |
+ * | upload tempname uploadname | 3 |
+ * | upload names | 2 |
+ * +----------------------------------------+-------+
*
* a subcommand first optional argument must be the name
* of an upload
@@ -1090,10 +1091,10 @@ TCL_CMD_HEADER( Rivet_Upload )
NAMES
};
- static CONST84 int cmds_objc[] = { 3,4,3,3,3,2,3,3,2 };
+ static CONST84 int cmds_objc[] = { 3,4,3,3,3,3,3,3,2 };
int expected_objc;
- rivet_thread_private* private;
+ rivet_thread_private* private;
THREAD_PRIVATE_DATA(private)
CHECK_REQUEST_REC(private,"::rivet::upload")
@@ -1105,7 +1106,7 @@ TCL_CMD_HEADER( Rivet_Upload )
expected_objc = cmds_objc[subcommandindex];
- if (objc < expected_objc) {
+ if (objc != expected_objc) {
Tcl_Obj* infoobj = Tcl_NewStringObj("Wrong argument numbers: ",-1);
Tcl_IncrRefCount(infoobj);
diff --git a/src/mod_rivet_ng/rivet_types.h b/src/mod_rivet_ng/rivet_types.h
index 787a15f..edcd30a 100644
--- a/src/mod_rivet_ng/rivet_types.h
+++ b/src/mod_rivet_ng/rivet_types.h
@@ -21,10 +21,8 @@
under the License.
*/
-/* $Id$ */
-
-#ifndef __RIVET_TYPES_H__
-#define __RIVET_TYPES_H__
+#ifndef __rivet_types_h__
+#define __rivet_types_h__
#include <httpd.h>
#include <tcl.h>
@@ -93,4 +91,5 @@ typedef struct TclWebRequest {
char* charset;
} TclWebRequest;
-#endif
+#endif /* __rivet_types_h__ */
+
diff --git a/src/request/apache_multipart_buffer.h b/src/request/apache_multipart_buffer.h
index b899a46..53d6c53 100644
--- a/src/request/apache_multipart_buffer.h
+++ b/src/request/apache_multipart_buffer.h
@@ -1,22 +1,26 @@
-/* Copyright 2008 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+/* apache_multipart_buffer.h -- form multipart data handling */
+
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
*/
-/* $Id$ */
-
-#ifndef _APACHE_MULTIPART_BUFFER_H
-#define _APACHE_MULTIPART_BUFFER_H
+#ifndef __apache_multipart_buffer_h__
+#define __apache_multipart_buffer_h__
#include "apache_request.h"
@@ -56,4 +60,4 @@ int multipart_buffer_eof(multipart_buffer *self);
}
#endif
-#endif
+#endif /*__apache_multipart_buffer_h__ */
diff --git a/src/request/apache_request.c b/src/request/apache_request.c
index b370273..442f033 100644
--- a/src/request/apache_request.c
+++ b/src/request/apache_request.c
@@ -1,16 +1,22 @@
-/* Copyright 2000-2004 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+/* apache_request.c -- Apache multipart form data handling */
+
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
*/
#include <errno.h>
diff --git a/src/request/apache_request.h b/src/request/apache_request.h
index 22b8058..af84334 100644
--- a/src/request/apache_request.h
+++ b/src/request/apache_request.h
@@ -1,5 +1,26 @@
-#ifndef _APACHE_REQUEST_H
-#define _APACHE_REQUEST_H
+/* apache_request.h -- mod_rivet upload request functions */
+
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+
+#ifndef __apache_request_h__
+#define __apache_request_h__
#include "httpd.h"
#include "http_config.h"
@@ -93,11 +114,9 @@ ApacheUpload *ApacheUpload_find(ApacheUpload *upload, char *name);
#define ApacheUpload_size(upload) ((upload)->size)
-#define ApacheUpload_info(upload, key) \
-apr_table_get((upload)->info, (key))
+#define ApacheUpload_info(upload, key) apr_table_get((upload)->info, (key))
-#define ApacheUpload_type(upload) \
-ApacheUpload_info((upload), "Content-Type")
+#define ApacheUpload_type(upload) ApacheUpload_info((upload), "Content-Type")
#define ApacheRequest_set_post_max(req, max) ((req)->post_max = (max))
#define ApacheRequest_set_temp_dir(req, dir) ((req)->temp_dir = (dir))
@@ -122,4 +141,4 @@ char *ApacheRequest_expires(ApacheRequest *req, char *time_str);
#define REQ_DEBUG(a)
#endif
-#endif /* _APACHE_REQUEST_H */
+#endif /* __apache_request_h__ */
diff --git a/tests/runtests.tcl b/tests/runtests.tcl
index eaa9ee0..87ff358 100755
--- a/tests/runtests.tcl
+++ b/tests/runtests.tcl
@@ -16,8 +16,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# $Id$
-
set auto_path [linsert $auto_path 0 [file join [file dirname [info script]] apachetest]]
puts stderr "runtests.tcl is running with auto_path: $auto_path"
diff --git a/tests/upload.rvt b/tests/upload.rvt
index 5e84818..b9b5c40 100644
--- a/tests/upload.rvt
+++ b/tests/upload.rvt
@@ -1 +1,24 @@
-<? puts "[::rivet::upload names] [::rivet::upload exists uploadtest] [::rivet::upload size uploadtest] -[::rivet::upload type uploadtest]- [::rivet::upload filename uploadtest]" ?>
+<?
+ set names_res [catch { set up_names [::rivet::upload names] }]
+ set exists_res [catch { set up_exists [::rivet::upload exists uploadtest] }]
+ set size_res [catch { set up_size [::rivet::upload size uploadtest] }]
+ set type_res [catch { set up_type [::rivet::upload type uploadtest] }]
+ set filen_res [catch { set up_filen [::rivet::upload filename uploadtest] }]
+
+ if {$names_res || $exists_res || $size_res || $type_res || $filen_res } {
+ puts [join [list $names_res $exists_res $size_res $type_res $filen_res] "|"]
+ } else {
+ puts [join [list $up_names $up_exists $up_size $up_type $up_filen] "|"]
+ }
+
+
+ #if {[catch {
+ # puts [join [list [::rivet::upload names] \
+ # [::rivet::upload exists uploadtest] \
+ # [::rivet::upload size uploadtest] \
+ # [::rivet::upload type uploadtest] \
+ # [::rivet::upload filename uploadtest]] "|"]
+ # } e einfo]} {
+ # puts "Error $e: $einfo"
+ #}
+?>
diff --git a/tests/upload.test b/tests/upload.test
index 7b1ea9a..07ea699 100644
--- a/tests/upload.test
+++ b/tests/upload.test
@@ -1,4 +1,3 @@
-# $Id$
set testfilename1 upload.rvt
@@ -11,13 +10,12 @@ set testfilename1 upload.rvt
set outputData "--$bound\r\nContent-Disposition: form-data; name=\"uploadtest\"; filename=\"AngeloFish.jpg\"\r\n\r\n$data\n--${bound}--"
- set page [::http::geturl "${urlbase}$testfilename1" \
- -type "multipart/form-data; boundary=$bound" -query $outputData]
+ set page [::http::geturl "${urlbase}$testfilename1" -type "multipart/form-data; boundary=$bound" -query $outputData]
set ret [string trim [::http::data $page]]
::http::cleanup $page
set ret
-} {uploadtest 1 42747 -- AngeloFish.jpg}
+} {uploadtest|1|42747||AngeloFish.jpg}
set testfilename1 uploadsave.rvt
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tcl.apache.org
For additional commands, e-mail: commits-help@tcl.apache.org