Bug #2135

$HTTP["host"] == "hostname:port" works wrong

Added by liming almost 5 years ago. Updated almost 2 years ago.

Status:FixedStart date:2009-12-31
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:core
Target version:1.4.32
Missing in 1.5.x:No

Description

There is a bug in configure-glue.c, line 289~303

289   if (ck_colon == val_colon) {
290       /* nothing to do with it */
291       break;
292   }

When and only when ck_colon == val_colon == NULL, it breaks. Otherwise, it will go ahead.
Therefore, anything within $HTTP["host"] == "...:port" { } has no chance to be reach.

$HTTP["host"] == "localhost:8880" {
## it would never reach here!
}

configfile-glue.c.patch Magnifier (794 Bytes) liming, 2009-12-31 05:01


Related issues

Related to Bug #2439: (connection config) "host:port" should not work Invalid 2012-08-24

Associated revisions

Revision 2853
Added by stbuehler almost 2 years ago

fix :port handling in $HTTP["host"] checks (fixes #2135. thx liming)

Revision 2854
Added by stbuehler almost 2 years ago

fix :port handling in $HTTP["host"] checks (fixes #2135. thx liming)

History

#1 Updated by liming almost 5 years ago

  • Status changed from New to Patch Pending

#2 Updated by stbuehler almost 2 years ago

  • Description updated (diff)
  • Target version changed from 1.5.0 to 1.4.32

I will commit fixes soon, feedback whether it is working would be nice. Thx!

Also this affects 1.4.x too (i'll push to 1.5 too)

#3 Updated by stbuehler almost 2 years ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2853.

Also available in: Atom