Overview
| Artifact ID: | 96a190a289ef96f877f036fa680df599614d0940 |
|---|---|
| Ticket: | 218697ffffffffffffffffffffffffffffffffff
Regexp Error |
| User & Date: | nobody on 2000-10-26 01:04:14 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 1780 Bug Version: 8.1b3 SubmitDate: '1999-04-12' LastModified: '1999-08-07' Severity: MED Status: Released Submitter: pat ChangedBy: hobbs OS: Windows 95 Machine: X86 FixedDate: '1999-08-07' FixedInVersion: 8.2 ClosedDate: '2000-10-25' Name: Chang LI Extensions: none CustomShell: none ReproducibleScript: Followig code product error result in Tcl8.1b3, but correct in 8.0. # #Reportreport the exception #statusserver status #keywordshort description #messagedetail description # proc Report {status keyword message} { puts " Status:$status Keyword:$keyword Message:$message " } # #ParseFormparse CGI string #aFormInforeturn form info array # ReturnRESULT_OK or RESULT_ERROR # proc ParseForm {aFormInfo} { upvar $aFormInfo sFormData set sReqMethod $::env(REQUEST_METHOD) switch -exact -- $sReqMethod { POST {set sQuery [read stdin $::env(CONTENT_LENGTH)]} GET{set sQuery $::env(QUERY_STRING)} default {Report 500 "server error" "unsupport method" return RESULT_ERROR} } set pairs [split $sQuery &] foreach item $pairs { set pair [split $item =] set key [lindex $pair 0] set value [lindex $pair 1] regsub -all {\+} $value { } value while {[regexp {%[0-9A-Fa-f][0-9A-Fa-f]} $value matched]} { scan $matched "%%%x" hex set symbol [format %c $hex] regsub -all $matched $value $symbol value } if {[info exists sFormData($key)]} { append sFormData($key) "\0" $value } else { set sFormData($key) $value } } return RESULT_OK } set ::env(REQUEST_METHOD) GET set ::env(QUERY_STRING) {user=Larry%20Bird&age=35&pass=testing&user=Wong} if {[string compare [ParseForm sForm] RESULT_OK] == 0} { puts "user=$sForm(user) age=$sForm(age)" } ObservedBehavior: output a high 8 bit character. repeat execute with source "$filenme" to run this code get append output string. DesiredBehavior: The output is a simple string. This works as desired in 8.2, fix must have been done along the way. -- 08/07/1999 hobbs - foundin changed to: "obsolete: 8.1b3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "43. Regexp"
- title changed to: "Regexp Error"
- type changed to: "Bug"