Add basic support for 301/302s.