Post Reply 
Modifying POST data
Oct. 27, 2012, 09:35 AM
Post: #1
Modifying POST data
Using "Redirector-SSL", all HTTPS requests are replaced by a Proxo URL command prx/http://https.. When I save a bookmark in Diigo on secure pages, Diigo uses the original URL/Referer, not the fixed one (see the grey line starting with json=):

[Image: 20121027112227log.jpg]

I think I can write a header filter to replace the URL command in the POST data, but how do I correct the Content-Length? I'm not aware of any method to do calculations in Proxomitron. Or can I just add some crap data to the post to match exactly 552 bytes?

A second, off-topic question would be: If I wanted to save the bookmark to delicio.us, too, how could I generate a second request?
Add Thank You Quote this message in a reply
Oct. 27, 2012, 11:30 PM
Post: #2
RE: Modifying POST data
duebel13 Wrote:I think I can write a header filter to replace the URL command in the POST data, but how do I correct the Content-Length? I'm not aware of any method to do calculations in Proxomitron. Or can I just add some crap data to the post to match exactly 552 bytes?

I don't think you can directly alter POST data.
http://prxbx.com/forums/showthread.php?t...37#pid3037
http://prxbx.com/oldforums/index.php?top...27#msg2127

You may be able to alter the html that creates the POST data with HTML web page filters, however.

duebel13 Wrote:A second, off-topic question would be: If I wanted to save the bookmark to delicio.us, too, how could I generate a second request?

I think you'd have to add some code to the page being bookmarked.

However, if the POST data were the same, I wonder what adding a LOCATION header(for delicio.us) to the diigo response headers would do...
Add Thank You Quote this message in a reply
Oct. 28, 2012, 07:40 AM (This post was last modified: Oct. 28, 2012 07:43 AM by duebel13.)
Post: #3
RE: Modifying POST data
(Oct. 27, 2012 11:30 PM)JJoe Wrote:  I don't think you can directly alter POST data.

OK, I've learned two things from this. The second is to not only search this forums before posting, but the old forums, too. :-)

Scott wrote: "The main reason you can't modify posted data is you have to include the length up-front in the content-length header."

That's exactly what I noticed right from the beginning and my first (and only) trial acknowledged that:

Code:
In = FALSE
Out = TRUE
Key = ".URL: (Out) 15 Diigo POST: Remove prefix and SSL URL command [dbl]"
URL = "$OHDR(Host: toolbar3.diigo.com)$OHDR(Content-Type: application/x-www-form-urlencoded*)"
Match = "\1http%3A%2F%2F*https..(\2)$SET(3=description%22%3A%22)(\3)(\4)$SET(5=%22%2C%22)(\5)(\6)"
Replace = "\1https%3A%2F%2F\2\3\4%20%20%20%20%20%20%20%20\5\6"

By adding blanks to the description text the content length would not have changed as the total number of inserted bytes matches the number of removed bytes. Anyway, it's not possible with Proxomitron. Period.

Quote:You may be able to alter the html that creates the POST data with HTML web page filters, however.

I don't think I can do that - it's not JavaScript but compiled code (the toolbar). I would need to switch from the toolbar back to using the bookmarklet. I like to keep things simple and this gets all too complicated. As there is nearly anything to filter on diigo.com except that usual Google Analysis tracking code, it's probably best to just not filter that site at all. I still have to find a convenient way about how to create a bypass list within the Redirector extension. As of now, it only provides exclude patterns.

JJoe Wrote:
duebel13 Wrote:A second, off-topic question would be: If I wanted to save the bookmark to delicio.us, too, how could I generate a second request?

I think you'd have to add some code to the page being bookmarked.

Actually there's an easier solution. :-)

Quote:However, if the POST data were the same, I wonder what adding a LOCATION header(for delicio.us) to the diigo response headers would do...

That's not what I intended. I'd had to modify the POST data, too. Just forget about it.

Thanks, JJoe.
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: