Ignore:
Timestamp:
2012-01-02 13:35:40 (2 years ago)
Author:
Tollef Fog Heen <tfheen@…>
Branches:
master, 4.0, experimental-ims
Children:
b70a93
Parents:
a4e2d47
git-author:
Tollef Fog Heen <tfheen@…> (2012-01-02 12:58:03)
git-committer:
Tollef Fog Heen <tfheen@…> (2012-01-02 13:35:40)
Message:

Add support for banning on http.status

Fixes: #1076

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bin/varnishd/cache/cache_ban.c

    rff61fc r3d43f6  
    114114#define BAN_OPER_NMATCH 0x13 
    115115 
    116 #define BAN_ARG_URL     0x18 
    117 #define BAN_ARG_REQHTTP 0x19 
    118 #define BAN_ARG_OBJHTTP 0x1a 
     116#define BAN_ARG_URL             0x18 
     117#define BAN_ARG_REQHTTP         0x19 
     118#define BAN_ARG_OBJHTTP         0x1a 
     119#define BAN_ARG_OBJSTATUS       0x1b 
    119120 
    120121/*-------------------------------------------------------------------- 
     
    610611        const uint8_t *be; 
    611612        char *arg1; 
     613        char buf[10]; 
    612614 
    613615        be = bs + ban_len(bs); 
     
    628630                case BAN_ARG_OBJHTTP: 
    629631                        (void)http_GetHdr(objhttp, bt.arg1_spec, &arg1); 
     632                        break; 
     633                case BAN_ARG_OBJSTATUS: 
     634                        arg1 = buf; 
     635                        sprintf(buf, "%d", objhttp->status); 
    630636                        break; 
    631637                default: 
Note: See TracChangeset for help on using the changeset viewer.