Ticket #316 (closed enhancement: fixed)

Opened 3 months ago

Last modified 4 days ago

Referer missing in remoting client

Reported by: thijs Owned by: thijs
Priority: minor Milestone: 0.4
Component: Client Version: 0.3.1
Keywords: referer Cc:

Description

Best option would be to leave it blank by default, but giving the option to modify it.

1.2.3.4 - - [06/Jun/2008:15:15:35 -0500] "POST /gateway/bytearray/ HTTP/1.1" 200 135 "client.py" "PyAMF/0.4.0"

Attachments

test-316.py (0.6 kB) - added by thijs 2 months ago.
referer test app
referer-316.patch (2.9 kB) - added by thijs 2 months ago.
Patch against r1464

Change History

  Changed 3 months ago by thijs

  • keywords review added
  • status changed from new to assigned

Branch ready for review, assigning to Nick.

  Changed 2 months ago by nick

  • keywords review removed
  • owner changed from nick to thijs

From Wikipedia:

The referer, or HTTP referer, identifies, from the point of view of an internet webpage or resource, the address of the webpage (commonly the URL, the more generic URI or the i18n updated IRI) of the resource which links to it. By checking the referer, the new page can see where the request came from.

So setting the referer to a script name makes no sense, however I can see the value of setting the referer easily as part of the client api.

The default referer argument should be None and only set the corresponding header when a none None value is encountered.

Once that is done, I'll look into the branch in further detail.

  Changed 2 months ago by thijs

  • summary changed from Referrer missing in AMF client to Referer missing in remoting client

Updated the branch in r1465. Will create a new separate branch or patch for the referer. Also attached a test client.

Changed 2 months ago by thijs

referer test app

  Changed 2 months ago by thijs

See attached patch for a fix.

  Changed 2 months ago by thijs

  • keywords review added
  • owner changed from thijs to nick

follow-up: ↓ 7   Changed 2 months ago by nick

  • keywords review removed
  • owner changed from nick to thijs

Some small comments:

  • self.referer != None should be self.referer is not None
  • some whitespace needs to be cleaned up
  • DEFAULT_REFERER is not strictly necessary as the value is None

Once all that is done, I'm happy.

Changed 2 months ago by thijs

Patch against r1464

in reply to: ↑ 6   Changed 2 months ago by thijs

  • keywords referer, review added
  • owner changed from thijs to nick

Replying to nick:

Some small comments: * self.referer != None should be self.referer is not None * some whitespace needs to be cleaned up * DEFAULT_REFERER is not strictly necessary as the value is None Once all that is done, I'm happy.

I made the adjustments and attached an updated patch, ready for review.

  Changed 2 months ago by nick

  • keywords referer added; referer, review removed
  • owner changed from nick to thijs

Okay to merge.

  Changed 2 months ago by thijs

  • status changed from assigned to closed
  • resolution set to fixed

Merged patch in r1466.

  Changed 4 days ago by thijs

  • component changed from Remoting to Client
Note: See TracTickets for help on using tickets.