public static HTTPRequest mergeRoomFields(final HTTPRequest httpReq, Pair<String,String> setPairs[], Room R)
	{
		final Hashtable<String,String> mergeParams=new XHashtable<String,String>(httpReq.getUrlParametersCopy());
		final HTTPRequest mergeReq=new HTTPRequest()
		{
			public final Hashtable<String,String> params=mergeParams;
			@Override public String getHost() { return httpReq.getHost(); }
			@Override public String getUrlPath() { return httpReq.getUrlPath(); }
			@Override public String getFullRequest() { return httpReq.getFullRequest(); }
			@Override public Map<String,String> getUrlParametersCopy() { return new XHashtable<String,String>(params); }
			@Override public String getUrlParameter(String name) { return params.get(name.toLowerCase()); }
			@Override public boolean isUrlParameter(String name) { return params.containsKey(name.toLowerCase()); }
			@Override public Set<String> getUrlParameters() { return params.keySet(); }
			@Override public HTTPMethod getMethod() { return httpReq.getMethod(); }
			@Override public String getHeader(String name) { return httpReq.getHeader(name); }
			@Override public InetAddress getClientAddress() { return httpReq.getClientAddress(); }
			@Override public int getClientPort() { return httpReq.getClientPort(); }
			@Override public InputStream getBody() { return httpReq.getBody(); }
			@Override public String getCookie(String name) { return httpReq.getCookie(name); }
			@Override public Set<String> getCookieNames() { return httpReq.getCookieNames(); }
			@Override public List<MultiPartData> getMultiParts() { return httpReq.getMultiParts(); }
			@Override public double getSpecialEncodingAcceptability(String type) { return httpReq.getSpecialEncodingAcceptability(type); }
			@Override public String getFullHost() { return httpReq.getFullHost(); }
			@Override public List<long[]> getRangeAZ() { return httpReq.getRangeAZ(); }
			@Override public void addFakeUrlParameter(String name, String value) { params.put(name.toLowerCase(), value); }
			@Override public void removeUrlParameter(String name) { params.remove(name.toLowerCase()); }
			@Override public Map<String,Object> getRequestObjects() { return httpReq.getRequestObjects(); }
			@Override public float getHttpVer() { return httpReq.getHttpVer(); }
		};
		for(final String[] pair : STAT_CHECKS)
			if(mergeReq.isUrlParameter(pair[1]) && (mergeReq.getUrlParameter(pair[1]).length()==0))
				mergeReq.addFakeUrlParameter(pair[1].toLowerCase(), R.getStat(pair[0]));
		CMLib.map().resetRoom(R);
		R=(Room)R.copyOf();
		final RoomStuff stuff=new RoomStuff(R);
		final Pair<String,String>[] activePairs = makePairs(stuff,new Vector<Pair<String,String>>());
		final List<Pair<String,String>> submittedRoomPairsList = toPairs(mergeParams);
		final List<Pair<String,String>> commonRoomsPairsList=Arrays.asList(setPairs);
		final List<Pair<String,String>> currentRoomPairsList=new XVector(Arrays.asList(activePairs));
		RoomData.mergeRoomField(currentRoomPairsList,commonRoomsPairsList,submittedRoomPairsList,new String[]{"AFFECT","ADATA"});
		RoomData.mergeRoomField(currentRoomPairsList,commonRoomsPairsList,submittedRoomPairsList,new String[]{"BEHAV","BDATA"});
		RoomData.mergeRoomField(currentRoomPairsList,commonRoomsPairsList,submittedRoomPairsList,new String[]{"MOB"});
		RoomData.mergeRoomField(currentRoomPairsList,commonRoomsPairsList,submittedRoomPairsList,new String[]{"ITEM","ITEMWORN","ITEMCONT"});
		for(final Pair<String,String> p : currentRoomPairsList)
		{
			if(p.second==null)
				mergeParams.remove(p.first);
			else
				mergeParams.put(p.first, p.second);
		}
		if(!mergeParams.containsKey("AFFECT1")) mergeParams.put("AFFECT1", "");
		if(!mergeParams.containsKey("BEHAV1")) mergeParams.put("BEHAV1", "");
		if(!mergeParams.containsKey("MOB1")) mergeParams.put("MOB1", "");
		if(!mergeParams.containsKey("ITEM1")) mergeParams.put("ITEM1", "");
		return mergeReq;
	}