request

Crawling Ajax.request url directly ... permission error

I need to crawl a web board, which uses ajax for dynamic update/hide/show of comments without reloading the corresponding post. I am blocked by this comment area. In Ajax.request, url is specified with a path without host name like this : new Ajax(**'/bbs/comment_db/load.php'**, { update : $('comment_result'), evalScript...

Django templates: create a "back" link?

I'm tooling around with Django and I'm wondering if there is a simple way to create a "back" link to the previous page using the template system. I figure that in the worst case I can get this information from the request object in the view function, and pass it along to the template rendering method, but I'm hoping I can avoid all this...

How to send a HEAD HTTP request in Python to Amazon S3?

I'm trying to retrieve HTTP HEAD information from a S3 resource using Python. Unfortunately the response always returns a 403 error. I am using code that was suggested here but unfortunately this does not work for S3 requests. Here is the code (host and key details omitted): >>> import httplib >>> conn = httplib.HTTPConnection("www.myb...

Any resource/codes on how fiddler works?

I need to track http/url requests & redirects from a windows forms application using C#. It should handle both IE & firefox. Not sure if Fiddler is open-source but if i'm not mistaken, it's written using .NET. Sample codes or online articles on how to listen to http/url requests & redirects will be appreciated. Thanks! ...

Get Request and Session Parameters and Attributes from JSF pages

Hi there, I'm using JSF with facelets and I need to get the request and session parameters inside the JSF page. In JSP pages i got this parameter like that : "${requestScope.paramName}" or "${sessionScope.paramName}". But now after using JSF there are only beans and you can't get any value except bean attributes. NOTE: the session attri...

How do I add data from a PHP form into an array?

If I have a loop that requests my data from my form: for ($i=0;$i < count($_POST['checkbx']);$i++) { // calculate the file from the checkbx $filename = $_POST['checkbx'][$i]; $clearfilename = substr($filename, strrpos ($filename, "/") + 1); echo "'".$filename."',"; } how do I add that into the sample ...

.NET: Hitting the back button messes up my event handler

Hey all. I have a ASP.NET page that lists a bunch of user accounts. If I click on a user, an event called LinkChosen is fired, which opens the account view page for that user. I can also search for users, which narrows down the list. This event is called btnSearch_click If I click on a user, LinkChosen() is called, and I'm taken to a ...

Web Dev Helper like HTTP request trace in IE8

The awesome tool Web Development Helper allows me to see ALL the http requests from the browser (IE6/IE7) to the server. However the tool does not seem to work in IE8-RC1. Does IE8 developer tools have a similar feature built in? If yes, how do I access it? TIA rams ...

Why not just using ajax for Page Requests to load the page content?

Very much Webpages loading all their content to change little informations. Now i would like to know why shouldn´t the developers use ajax for the main page requests? I will like to develop the main requests on my webpage with ajax but i dont know any cons. Has anybody an idea why anybody shouldn't use ajax so much? ...

url does not decode properly with request[] in C#

I have an object like this: public class adapterContext { public HttpRequest Request; } adapterContext ac = new adapterContext(); ac.Response = context.Response; I pass this object to my functions and use ac.Request[""] to get my url variables. However this somehow does not translate national/special characters correct. When I us...

How should the Request Body look like?

I have a WCF service with a method which looks like this (returns null for testing with the debugger, I care only about getting data in for now): [OperationContract] [WebInvoke(Method = "POST", UriTemplate = "fares", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedReq...

How to pass Form Values to the Controller in .NET MVC

In ASP.net MVC: How should/Can I pass Form data (From the View) to the Controller? This is the way I am heading : The Controller Index function is passing a ViewModel object to the View. The ViewModel object contains a paginated list as well as some SelectLists. _ The ViewModel object also contains a custom class I named theFilter....

How do I set urlpatterns based on domain name or TLD, in Django?

How do I set urlpatterns based on domain name or TLD, in Django? For some links, Amazon shows url in native language based on its website tld. http://www.amazon.de/bücher-buch-literatur/ ( de : books => bücher ) http://www.amazon.fr/Nouveautés-paraître-Livres/ ( fr : books => Livres ) http://www.amazon.co.jp/和書-ユーズドブッ-英語学習/ ( ...

In ASP.NET MVC, how do you retrieve the filename of the script being run?

I need to get the name of the script being executed on the master page to update the Last Write time. I'm using this: System.IO.File.GetLastWriteTime(Server.MapPath(Request.FilePath)) which works for the default.aspx, but if its within a View I am unable to workout what the physical path to the file is to get the LastWriteTime. Is t...

Modify HttpServletRequest body

I'm working on legacy code and need to make a patch. The problem: an ancient application sends bad HTTP POST requests. One of the parameters is not URL encoded. I know that this parameter always comes last and I know it's name. I'm now trying to fix it on the server side which is running inside tomcat. This parameter is not accessible ...

Requests limit per hour

How to limit requests per hour from one IP like it is in Twitter? For example, I want to provide 100 requests per hour. Is there any solution? Apache modules? Thanks. ...

django request in template

Hi! I've enabled the django request processor TEMPLATE_PROCESSORS = ( "django.core.context_processors.auth", "django.core.context_processors.debug", "django.core.context_processors.i18n", "django.core.context_processors.media", "django.core.context_processors.request", ) Still i don't have to request variable available in templates. I've...

extract data from cocoa http get request

I implemented the following code: NSURL *url = [ NSURL URLWithString:[ NSString stringWithFormat: @"http://www.google.com/search?q=%@", query ] ]; NSURLRequest *request = [ NSURLRequest requestWithURL: url ]; I want to extract the body from what I receive back from the url above. I attempted: NSData *data = [request HTTPBody]; The ...

How many requests per second does your webapp serve?

I'am interested in some data gathering about requests per second (the definition of requests per second i use is 'a user requests a certain functionality provided by an URL' (this means requests != hits (one request may consist of multiple hits))). So how many requests per second and server do you serve? If you dont maintain your own app...

When, during the life cycle of a Request, does a web.config <location path='The/Path'> tag execute?

When, during the life cycle of a Request, does a web.config <location path='The/Path'> tag execute? ...