Menu

#171 ns_adp_register{adp,proc,tag} case-sensitivity bug in 4.0

aolserver_v40
open
nobody
API: C (24)
6
2004-09-01
2003-11-15
No

If you ns_register_adptag or ns_adp_registeradp a fancy
tag with non-lowercase characters, the tag won't be
processed.

I.e. both of these work under AOLserver 3.x:
catch {ns_register_adptag sometag procedure}
catch {ns_register_adptag someTag procedure}

but only the first works under AOLserver 4 (latest CVS).
Please see attached patch.

Discussion

  • Jamie Rasmussen

    Jamie Rasmussen - 2003-11-15
     
  • Dossy Shiobara

    Dossy Shiobara - 2004-09-01

    Logged In: YES
    user_id=21885

    Indeed, in nsd/adpparse.c, GetTag() converts the input to
    lower-case, so RegisterCmd() should do the same.

    I also see in nsd/tclcmds.c that ns_adp_registertag is using
    NsTclAdpRegisterAdpCmd() which makes it equivalent to
    ns_adp_registeradp.

    However, there is a command ns_register_adptag which uses
    NsTclRegisterTagCmd(). Should ns_adp_registertag be the
    same as ns_adp_registeradp, or ns_register_adptag? I'm in
    favor of getting rid of ns_register_adptag (as the
    "ns_register" prefix implies request-handling like
    ns_register_proc, ns_register_filter, etc.) and make
    ns_adp_registertag call NsTclRegisterTagCmd() instead of
    NsTclAdpRegisterAdpCmd().

     
  • Dossy Shiobara

    Dossy Shiobara - 2004-09-01
    • milestone: 306726 --> aolserver_v40
    • priority: 5 --> 6
    • summary: ADP case-sensitivity bug in 4.0 --> ns_adp_register{adp,proc,tag} case-sensitivity bug in 4.0
     
  • Jamie Rasmussen

    Jamie Rasmussen - 2004-09-03

    Logged In: YES
    user_id=522678

    The changes you propose should probably be considered as a
    separate feature request, since they would break backwards
    compatibility, and so I think wouldn't be applied to the
    same branches as the fix for this case-insensitivity bug.

    I agree that the current command names are confusing. I
    would be in favor of the changes you suggest. (We should
    also add documentation for these commands to the Wiki.)

     

Log in to post a comment.