mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 18:03:39 +01:00
Get mailto with very long url cope with webservers url limit (e.g. Nginx:4k) via using POST request
This commit is contained in:
parent
d2eee09ff2
commit
39d10bb0c5
@ -66,15 +66,15 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
|
||||
// Accoring to microsoft, IE 10/11 can only accept a url with 2083 caharacters
|
||||
// therefore we need to send request to compose window with POST method
|
||||
// instead of GET. We create a temporary <Form> and will post emails.
|
||||
if (uri.length > 2083 && navigator.userAgent.match(/Trident|MSIE|Edge/,"g"))
|
||||
// ** WebServers and other browsers also have url length limit:
|
||||
// Firefox:~ 65k, Safari:80k, Chrome: 2MB, Apache: 4k, Nginx: 4k
|
||||
if (uri.length > 2083)
|
||||
{
|
||||
popup = egw.open('','mail','add','','compose__','mail');
|
||||
popup.onload = new function(){
|
||||
// Build a temp Form and submit right away
|
||||
var $tmpForm = jQuery('<form method="post" target="'+popup.name+'" action="'+popup.location.href+'">\n\
|
||||
// Build a temp Form and submit right away
|
||||
var $tmpForm = jQuery('<form method="post" target="'+popup.name+'" action="index.php?menuaction=mail.mail_compose.compose">\n\
|
||||
<input name="preset[mailto]" type="text" value="'+uri+'"></input><input type="submit"></input></form>').appendTo('body').submit();
|
||||
$tmpForm.remove();
|
||||
};
|
||||
$tmpForm.remove();
|
||||
}
|
||||
else // simple GET request
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user