Check-in [b2b280b87e]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Bug fix [66fb3aeef5] -- correct header parsing
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b2b280b87e8115f8c9a6d7f54472acbc79b862eb
User & Date: gerald 2012-10-31 14:37:33
Context
2012-11-02 05:06
Corrections for Embedded Mode. check-in: 0bdb608566 user: gerald tags: trunk
2012-10-31 14:37
Bug fix [66fb3aeef5] -- correct header parsing check-in: b2b280b87e user: gerald tags: trunk
2012-10-31 14:19
Bug fix: [68310fe3bd] - Content Length wrong check-in: ba63c62ab5 user: gerald tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Embedded.tcl.

632
633
634
635
636
637
638

639
640
641
642
643
644
645
646
647
648

649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
# Maintenance History - as this file is modified, please be sure that you
#                       update this segment of the file header block by
#                       adding a complete entry at the bottom of the list.
#
# Version     Date     Programmer   Comments / Changes / Reasons
# -------  ----------  ----------   -------------------------------------------
#       1  03/28/2008  G.Lester     Initial version

#
#
###########################################################################
proc ::WS::Embeded::accept {port sock ip clientport} {
    variable portInfo

    upvar #0 ::WS::Embeded::Httpd$sock query
    $portInfo($port,logger) "Receviced request on $port for $ip:$clientport"

    array unset query reply

    if {[catch {
        gets $sock line
        $portInfo($port,logger) "Request is: $line"
        set auth {}
        set request {}
        for {set c 0} {[gets $sock temp]>=0 && $temp ne "\r" && $temp ne ""} {incr c} {
            lassign [split $temp :] key data
            dict set request header [string tolower $key] [string trim [join $data :]]
        }
        if {[eof $sock]} {
            $portInfo($port,logger)  "Connection closed from $ip"
        }
        foreach {method url version} $line { break }
        switch -exact -- $method {
            POST {






>










>





|

|







632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
# Maintenance History - as this file is modified, please be sure that you
#                       update this segment of the file header block by
#                       adding a complete entry at the bottom of the list.
#
# Version     Date     Programmer   Comments / Changes / Reasons
# -------  ----------  ----------   -------------------------------------------
#       1  03/28/2008  G.Lester     Initial version
#   2.3.0  10/31/2012  G.Lester     Bug fix [66fb3aeef5] -- correct header parsing
#
#
###########################################################################
proc ::WS::Embeded::accept {port sock ip clientport} {
    variable portInfo

    upvar #0 ::WS::Embeded::Httpd$sock query
    $portInfo($port,logger) "Receviced request on $port for $ip:$clientport"

    array unset query reply
    chan configure $sock -translation crlf
    if {[catch {
        gets $sock line
        $portInfo($port,logger) "Request is: $line"
        set auth {}
        set request {}
        while {[gets $sock temp] > 0 && ![eof $sock]} {
            lassign [split $temp :] key data
            dict set request header [string tolower $key] [string trim $data]
        }
        if {[eof $sock]} {
            $portInfo($port,logger)  "Connection closed from $ip"
        }
        foreach {method url version} $line { break }
        switch -exact -- $method {
            POST {