Modify

Opened 11 years ago

Closed 11 years ago

#2489 closed Feature Request (Completed)

HttpSetUserAgent return value

Reported by: anonymous Owned by: Jon
Milestone: 3.3.11.0 Component: AutoIt
Version: Severity: None
Keywords: HttpSetUserAgent, return value Cc:

Description

Could you please make HttpSetUserAgent return the old user agent when setting a new one?
This would allow people to use this function in UDFs without having to worry about interfering with other parts of the script, because you could undo your change at the end of the function call.

Attachments (0)

Change History (3)

comment:1 Changed 11 years ago by BrewManNH

From the help file:

The string to set as the user-agent. The default user-agent is "AutoIt". Passing an empty string will reset the user-agent back to the default.

This says all that you have to do to return it to the default is to pass it an empty string. You don't need to keep track of it, because you can reset it.

comment:2 Changed 11 years ago by Mat

BrewManNH, that does return it back to the default, but the ticket is for the case when the user sets the agent, and then calls a UDF, or another function, which requires a different agent.

The UDF could reset it to the default, but this is not the same as setting it back to its old value.

I'm sure the implementation is trivial, and is not breaking in any way, so I agree that returning the old user agent string is a good idea.

comment:3 Changed 11 years ago by Jon

  • Milestone set to 3.3.11.0
  • Owner set to Jon
  • Resolution set to Completed
  • Status changed from new to closed

Added by revision [9430] in version: 3.3.11.0

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jon.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.