-60 Tee-shirts imprimés LAST 7 ANGELS

2014-12-03 Thread 24 KRONOS
 
Version en ligne
 

Ajouter nous à votre carnet d’adresses

LA KOURSE AUX BONS PLANS


 
Vente du Jeudi 4 Décembre

 
T-shirts imprimés
-60% 



19,95€-60%Durée : 48H


BIENTÔT


Ouverture
Vendredi 05/12
 
Chaussures Sports



à partir de 29,95€Jusqu'à -50%Durée : 48H


 

Ouverture
Vendredi 05/12
 
Luges



14,95€-50%Durée : 48H


  
ENTREPRISE FRANCAISESATISFAIT OU REMBOURSÉPAIEMENT 100% SECUREPAIEMENT
PAYPALSUIVEZ-NOUS
SUR FACEBOOK




Veuillez me retirer de votre liste de diffusion




Set header with value extracted from path

2014-12-03 Thread Ryan
When I received URL's with the following format:

/1/a/b/c

I rewrite the URL removing the digit like so:

/v2.0.0/a/b/c

And I need to set a header with the value of the digit I replaced, i.e.:

X-ID: 1

Is it possible to do this within haproxy? I am able to reqrep the original
url, and set an ACL to be used with an "http-request add-header" directive,
but I dont know how to extract the url value and either save it for use in
the add-header, or to write a format string in the add-header directive
that will do this.

I'm playing around with something like this but not having much luck:

acl url_id path_reg ^/([0-9]+)/.*$
http-request add-header X_ID %[path_reg(^/([0-9]+)/.*$)] if url_id

Any ideas?

Thanks,
Ryan


hot Diodes LED DIALIGHT for sale

2014-12-03 Thread Parts Components Ltd
Dear, Howareyou? We ared=istributorof: =Diodes LEDCREE &n=bsp;AVAGO= SEOULROHM  
LUMEX=NICHIA =CITIZEN =;LEDIKODIALIGHTSHARP= OSRAM=VISHAY  LITEON 
=LIGITEK =; TOSHIBASANKEN EVERLIGHTKINGBRIGHTSTANLEYFAIRCHILDSUNLED  
HARVATEK SAMSUN=GPANASONIC =20Alsohe=lpyoufindhard-to-find,shortageandobsolete 
parts.BestRegards,=   Linda PartsComponentsLtd==Skype:  
partscomponentslindaWebsite:www.partscomponentshk.com 

IP65 and UL listed Corn light with Samsung LED, 5 years warranty!

2014-12-03 Thread Cherry Lee

  
Dear Friends:
 
Here, We would like to introduce our new led corn light. 
 
Please check the attached below picture, the main characteristics as below:
1. IP65 Waterproof level; can be used as the outdoor light such as the replacement of led street light and garden light etc.  2. 360 degree bean angle, 110lm/W, 5 years warranty.
 
3. The power can be made 20W, 36W, 45W, 100W,75W,125W, the size has D70,D90,D130. Very popular be used as church, airport, high and commercial buildings, office etc.;
 
Does this item suitable for your business? Would like to provide specification and prices to you if you are interested.Sincerely,
 
Best Regards,
 
Cherry LeeSales Manager
 
Shenzhen Romanso Electronic Co.,LtdAdd:6 Floor, E Building, Baoshi Science and Technology Park, Baoshi Road, Shiyan Town, BaoAn District, Shenzhen, China.Tel:+86-0755-29197500 Fax:+86-0755-29197502Cell: +86-18565699323Email: che...@romanso.com
  

Re: Multiple HAProxies launched at the same time generate same random numbers in smp_fetch_rand

2014-12-03 Thread Willy Tarreau
Hello,

On Tue, Dec 02, 2014 at 03:50:22PM -0700, Leonid A.Movsesyan wrote:
> Hello,
> 
> I'm using HAProxy's rand function in configs to generate random values for
> HTTP headers. The problem is that multiple HAProxies on the same server that
> where launched at the same time (it happens sometimes in my system) are using
> the same seed value and generate the same sequence of random numbers which
> causes some bugs for me.

Well, if same random numbers cause some bugs, you're having a deeper problem,
because by definition, random numbers are non-correlated, so they can very well
be identical for some sequences. Thus, if your workload doesn't support this,
maybe you don't want to use random numbers but something else (eg: a hash on
something or whatever).

Also, I'm doubting a little bit because the random depends on the millisecond
the process starts, and on its pid. Thus I find it hard to imagine that you
had the luck to encounter that situation between multiple machines.

> Here's a patch for src/sample.c that solved this problem. I also need the
> numbers to be as unique as it possible, so the following patch works with
> /dev/urandom, but it might be a minor issue and it might be ignored for
> performance reasons.

I'm sorry but that cannot work :
  - it's out of question to *open* a file for each call to the random fetch!
  - even if you accepted this, it would not work when haproxy is run inside
a chroot (which is the recommended way of deploying it)

Also :

> @@ -1331,7 +1334,33 @@
>  smp_fetch_rand(struct proxy *px, struct session *s, void *l7, unsigned int 
> opt,
> const struct arg *args, struct sample *smp, const char *kw)
>  {
> - smp->data.uint = random();
> +int fd;
> +struct timeval tv;
> +
> +gettimeofday(&tv, 0);
> +
> +fd = open("/dev/urandom", O_RDONLY);
> +if (fd == -1) {
> +fd = open("/dev/random", O_RDONLY | O_NONBLOCK);
> +}
> +
> +srandom((getpid() << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec);
> +
> +/* Use random() only if /dev/urandom or /dev/random don't present
> +*  or can't be used.
> +*/

What you did above is totally wrong :
  - srandom() was called regardless of the fd test
  - gettimeofday() was called regardless of the fd test
  - getuid() has no chance of being different between identical LBs
  - you don't produce random numbers anymore given that you call
srandom() for each random, what you output is the time of day
which is the only variable here between multiple calls.

> +if (fd >= 0) {
> +ssize_t x = read(fd, &smp->data.uint, sizeof (unsigned int));
> +
> +if (x <= 0) {
> +smp->data.uint = random();
> +}
> +
> +close(fd);
> +}
> +else {
> +smp->data.uint = random();
> +}

What you need to do is to improve the seed upon startup instead.
Simply using this once upon startup :

 srandom(getpid() ^ tv.tv_sec ^ tv.tv_usec);

should be enough to ensure that multiple machines will run different
sequences.

Note that this is already equivalent to what is being done currently by
srandom(nowms-getpid()), except that it increases the time precision.

Regards,
Willy