Opened 15 years ago

Closed 15 years ago

#1991 defect closed fixed (fixed)

amp has problems with mixed case keyword args

Reported by: scmikes Owned by:
Priority: high Milestone: Core-2.5
Component: core Keywords: amp
Cc: Branch:
Author:

Description

Not sure if this is a bug or feature.

Attached is a very simple amp client and server.

This version fails. If you change fileName to fileName. Then all is well

Attachments (5)

fileTransferAmpServer.py (696 bytes) - added by scmikes 15 years ago.
fileTransferAmpServer.2.py (696 bytes) - added by scmikes 15 years ago.
fileTransferClient.py (1.2 KB) - added by scmikes 15 years ago.
fileTransferAmpServer.3.py (696 bytes) - added by scmikes 15 years ago.
working server (no camel case) filename
fileTransferClient.2.py (1.2 KB) - added by scmikes 15 years ago.
working amp client (no camel case filename)

Download all attachments as: .zip

Change History (12)

Changed 15 years ago by scmikes

Attachment: fileTransferAmpServer.py added

Changed 15 years ago by scmikes

Attachment: fileTransferAmpServer.2.py added

Changed 15 years ago by scmikes

Attachment: fileTransferClient.py added

Changed 15 years ago by scmikes

Attachment: fileTransferAmpServer.3.py added

working server (no camel case) filename

Changed 15 years ago by scmikes

Attachment: fileTransferClient.2.py added

working amp client (no camel case filename)

comment:1 Changed 15 years ago by scmikes

Sorry for the duplicate AmpServer.py (2nd file)

comment:2 Changed 15 years ago by Glyph

Status: newassigned

comment:3 Changed 15 years ago by Glyph

There was a tiny feature here buried under a pile of crap.

I've written some tests, fixed the bug, made the name-normalization private and documented its purpose a bit better, in ampquote-1991. I think it's ready for review.

comment:4 Changed 15 years ago by Glyph

Keywords: review added

To explain a bit further: the reason it was doing all this stuff with lowercasing was that Juice went through some ridiculous gyrations to totally "normalize" the format of all keys. This is no longer the case, because they don't have to fit into the rigid syntax of ": "-separated pairs. In the branch I mentioned, it only "normalizes" keys to turn names from the wire into valid Python identifiers.

comment:5 Changed 15 years ago by Glyph

Keywords: review removed

Jerub cannot access the website for some reason, there are connectivity problems to .au right now. But he checked out the code before those problems, and reviewed it, and can still get to IRC just fine - he assures me he has reviewed it.

He also couldn't find problems:

(01:41:50) Jerub: "kthnxbai, merge plz"
(01:44:36) Jerub: but seriously, it's a trivial change with tests, for behaviour that 
    shouldn't have been broken in the first place.

So I'm going to merge it.

comment:6 Changed 15 years ago by Glyph

Resolution: fixed
Status: assignedclosed

(In [17840]) Remove vestiges of JUICE-style header quoting in AMP.

Among other things, this makes mixed-case argument and command names work. Previously they would raise exceptions and kill the connection if you tried to use them. Although the amount of key-mangling has been significantly reduced, I've included a detailed explanation of why it's being done at all any more, where it is.

This also fixes a minor cleanup/pyflakes issue with test_amp; it wasn't causing problems, but it seemed like a likely place for a race-condition to pop up.

Author: glyph

Reviewer: jerub

Fixes #1991

comment:7 Changed 11 years ago by <automation>

Owner: Glyph deleted
Note: See TracTickets for help on using tickets.